You need to read the regex documentation. perlretut is a good place to start.
Your immediate problem is using [...] instead of (...) for capturing. The square bracket version matches any one of the characters in the set of characters given.
In reply to Re: perl regex
by GrandFather
in thread perl regex
by cbtshare
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |