Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^4: Regex help

by ikegami (Pope)
on Oct 26, 2004 at 18:27 UTC ( #402747=note: print w/replies, xml ) Need Help??


in reply to Re^3: Regex help
in thread Regex help

(?(?{code}true-regexp) (?(?{code}true-regexp|false-regexp) / B (\d\d) (? (?{ $1 < 38 || $1 > 49 }) # if invalid (?=A)(?=Z) # then fail # else succeed ) /x

It could also have been written:

/ B (\d\d) (?(?{ $1 >= 38 && $1 <= 49 }) # if valid # succeed | # else (?=A)(?=Z) # fail ) /x

(?=A)(?=Z) means the next char must be an 'A' and must be a 'Z'. That's never gonna happen.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://402747]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2021-10-17 18:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (72 votes). Check out past polls.

    Notices?