in reply to Reg Exp
You could use split, that splits a string into an array using a regex to determine the split position(s), as follow:
@result=split(/\s+\(|\)\s+/, $string);
This should split the string at any open parenthesis preceded by one or more spaces, and at any closed parenthesis followed by one or more spaces.
Rule One: Do not act incautiously when confronting a little bald wrinkly smiling man.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Reg Exp
by prasadbabu (Prior) on May 26, 2008 at 09:46 UTC | |
by psini (Deacon) on May 26, 2008 at 10:01 UTC | |
by chrism01 (Friar) on May 27, 2008 at 07:20 UTC |