![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| REGEX: Matching Null? | deckard | Shell Programming and Scripting | 2 | 06-05-2008 10:56 AM |
| how do i strip this line using perl regex. | ramky79 | Shell Programming and Scripting | 1 | 03-18-2008 12:10 PM |
| Parentheses in perl find/replace | Jeffish | Shell Programming and Scripting | 3 | 08-21-2007 11:10 AM |
| string matching in perl | ammu | Shell Programming and Scripting | 3 | 07-16-2007 02:47 PM |
| find -regex: matching multiple extensions | r0sc0 | Shell Programming and Scripting | 2 | 12-08-2005 02:32 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Perl regex help - matching parentheses
Let's say I'm trying to match potentially multiple sets of parentheses. Is there a way in a regular expression to force a match of closing parentheses specifically in the number of the opening parentheses?
For example, if the string is "((foo bar))", I want to be able to say "match any number of opening parentheses, then any number of non-parentheses, followed by the same number of closing parentheses as the opening parentheses found, no more and no less." This will be used for things like extracting "((bar))" from "(foo ((bar)))". Thanks in advance! -cvp |
| Bookmarks |
| Tags |
| perl, perl regex, regex |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|