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

Re^2: Regex - backreferencing multiple matches in one group.

by Anonymous Monk
on Mar 05, 2008 at 18:05 UTC ( [id://672232]=note: print w/replies, xml ) Need Help??


in reply to Re: Regex - backreferencing multiple matches in one group.
in thread Regex - backreferencing multiple matches in one group.

A couple minor suggestions:
Nesting is not needed.
The "\s+.*" at the end does nothing.
/\!(\S+?) #tablename \[(.*?)\] #table variables (?:\[(.*?)\])? (?:\[(.*?)\])? (?:\[(.*?)\])? /x

Replies are listed 'Best First'.
Re^3: Regex - backreferencing multiple matches in one group.
by ysth (Canon) on Mar 05, 2008 at 18:47 UTC
    Nesting is not needed, but more clearly indicates the up-to-4.

    The +.* I grant you, but the \s does do something.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2024-04-24 01:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found