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

Re: Regarding pattern Matching

by kcott (Bishop)
on Feb 04, 2017 at 13:39 UTC ( #1181087=note: print w/replies, xml ) Need Help??


in reply to Regarding pattern Matching

G'day Nansh,

Welcome to the Monastery.

As already pointed out by others, this is a poorly presented question. Without knowing what regex you've used, or what output your current code produces, it's impossible to say, with any certainty, why you're not getting the output you want. Please read "How do I post a question effectively?" before posting again.

As a complete guess, given you need parentheses to capture text that, itself, includes parentheses, you may not have escaped parentheses correctly (see perlre):

$ perl -E 'say +("X(a,b,c)" =~ /X(\([^)]+\))/)[0]' (a,b,c)

Also consider stepping through your matching code with Regexp::Debugger.

— Ken

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2022-01-28 02:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (72 votes). Check out past polls.

    Notices?