in reply to Re: Regex question
in thread Regex question
So much of your code can be simplified by changing
while ($str =~ /([A-Z,0-9])/ig) {
to
while ($str =~ /(([A-Z,0-9])\2*)/ig) {
The posted code is beyond not elegant. It's in the realm of needless complexity.
Update: Forgot to mention:
Besides that, I don't know why you imposed a limit on which characters can be processed. The OP didn't mention anything about ignoring characters which are neither unaccented latin alpha, romanlatin? digits nor a comma. (Did you even mean to put that comma there?)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Regex question
by ww (Archbishop) on May 20, 2009 at 20:29 UTC |