Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Regular Expression Builder

by Anonymous Monk
on Aug 30, 2002 at 16:19 UTC ( #194157=note: print w/replies, xml ) Need Help??


in reply to Regular Expression Builder

Given a string like "Rich36!", it would produce \w{4}\d{2}\! or \w+\d+\!.

And why wouldn't it produce one of these

/\w{6}!/ /\w+!/ /[A-Z][a-z]{3}\d\d!/ /Rich36!/ /......./ /\S+/ /.*/

I mean, the tightest or least general thing it could produce when given a $string is just /\Q$string\E/ and the most general thing would be /.*/s, and between those is a rather large space of candidates.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://194157]
help
Chatterbox?
[Discipulus]: ironically from his pubblications: "Can Disarmament Work?"
[erix]: when is the bird-brain's inauguration tweet?
[erix]: (wasn't augur something to with birds too?)
[erix]: augur
[erix]: ah, deciding on the the flight of birds - good idea ;)
[Discipulus]: as good as the Roma foundation
Discipulus we began with a fratricide..

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2017-01-20 13:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (174 votes). Check out past polls.