Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^3: Regular Expression Help

by Eimi Metamorphoumai (Deacon)
on Nov 16, 2005 at 15:54 UTC ( #509080=note: print w/replies, xml ) Need Help??


in reply to Re^2: Regular Expression Help
in thread Regular Expression Help

You'll have to figure out exactly what syntax it's using, since it's different from the normal regexp syntax. Here's a quick hack based on a guess of what you want, but it may not be robust.
my $full_text = "(7001) - This is some text"; my $check_str = "([7000|7001|7002|7003]) - This"; $check_str =~ s/([()])/\\$1/g; $check_str =~ s/\[/(?:/g; $check_str =~ s/\]/)/g; if ($full_text =~ /$check_str/) { print "full_text has the check_str\n"; }

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2020-10-21 14:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (217 votes). Check out past polls.

    Notices?