in reply to RegEx Problem
s/\B([A-Z])(?=[a-z])/-\l$1/g; # ?
Although if you can guarantee that a capital letter will never occur at the beginning of the string and will always denote a new word (ie, samIAm), you can simplify that to just...
s/([A-Z])/-\l$1/g;
--k.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: RegEx Problem
by L0rdPhi1 (Sexton) on May 29, 2002 at 00:54 UTC | |
by lestrrat (Deacon) on May 29, 2002 at 01:08 UTC | |
by Kanji (Parson) on May 29, 2002 at 01:28 UTC |