Re: Regular expression to match surrounding parenthesis
From: Abigail (abigail_at_abigail.nl)
Date: 07/07/04
- Next message: Peter J. Acklam: "Re: Regular expression to match surrounding parenthesis"
- Previous message: Scott J: "Re: sorting hash based on keys and replacing them in the same hash"
- In reply to: Bob: "Regular expression to match surrounding parenthesis"
- Next in thread: Peter J. Acklam: "Re: Regular expression to match surrounding parenthesis"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 07 Jul 2004 19:09:53 GMT
Bob (bob_nf@hotmail.com) wrote on MMMCMLXIII September MCMXCIII in
<URL:news:84c27559.0407071023.3aed77@posting.google.com>:
[] Hi,
[]
[] I am trying to create a regular expression to verify that user entered
[] data is surrounded by the same number of open and closed parenthesis.
[]
[] For example: if 'a' was the expression I was trying to match then a,
[] (a), ((a)), (((a)))... (((((((a))))))) would all be valid.
[]
[] I am not new to regular expressions but I am also not an expert. I
[] have spent hours searching for a solution but no luck.
You spend hours looking? Where did you look? The place I would look
first, the documentation that comes with Perl, mentions a regular
expression doing this.
[] Is this possible and if so any help would be appreciated?
Try helping yourself first.
Abigail
--
perl -e '$_ = q *4a75737420616e6f74686572205065726c204861636b65720a*;
for ($*=******;$**=******;$**=******) {$**=*******s*..*qq}
print chr 0x$& and q
qq}*excess********}'
- Next message: Peter J. Acklam: "Re: Regular expression to match surrounding parenthesis"
- Previous message: Scott J: "Re: sorting hash based on keys and replacing them in the same hash"
- In reply to: Bob: "Regular expression to match surrounding parenthesis"
- Next in thread: Peter J. Acklam: "Re: Regular expression to match surrounding parenthesis"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|