Aryeh M. Friedman wrote:
> I am attempting to make (without the perl expansions) a regular
> expansion that when used as a delim will split words on any
> punction/whitespace character *EXCEPT* "$" (for java people I want to
> feed it into something like this:
> for(String foo:input.split([insert regex here])

Since regexs are generally portable, here is a Perl version that splits
on any non alpha-num including spaces, but disregards the '$'. (regex
between / and /. Even though you said no Perl, I did it anyway ;)

my $string = 'hello%wo$rld*ste ve';

print join (', ', (split(/[^\w\$]/, $string)));


hello, wo$rld, ste, ve


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to