DNS wildcards are binary: it is everything or nothing, you can not match only some part of the label like your s*.example.com
. This is part of the protocol, so it will not work whatever software you use[1]
See RFC4592 and its section 2.1.1:
A "wildcard domain name" is defined by having its initial (i.e.,
leftmost or least significant) label be, in binary format:
0000 0001 0010 1010 (binary) = 0x01 0x2a (hexadecimal)
The first octet is the normal label type and length for a 1-octet-
long label, and the second octet is the ASCII representation [RFC 20]
for the '*' character.
So if you want to do something like that, you need to setup a wildcard, and then handle all requests at the application level in your webserver.
Remember that wildcards, as attractive as they may seem to be, can create complicated problems, even more so with CNAME records. Zonefiles are typically text files, so it is easy to automate their creation and putting in them any number of records, instead of using wildcards.
[1]: except of course with an highly specific server where you could plug a specific backend that would act on the label the way you need it.