|
|
| Don't ask to ask, just ask | |
| PerlMonks |
Re: Re: Re: Regular Expression Builderby demerphq (Chancellor) |
| on Aug 30, 2002 at 13:18 UTC ( [id://194187]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
One quibble is that because \d is a subset of \w then a string such as "abc123def" will get \w{9} in your version. Yup. But personally I consider that a feature not a bug. :-) After all ldkjdlkjf2098kklls probably isnt [[:alpha:]]+\d+[[:alpha:]]+ But we are both in agreement that there isnt a good way to do this, although as we both have shown there are a variety of bad ways to do it... BTW, is the . really necessary? I dont think it is as the s/// will just skip the char if it doesnt match. Oh and I considered using something like you post here, but I fgured that considering I tend not to use the POSIX char classes that much probably others wouldnt either. :-)
Yves / DeMerphq
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||