So you want to match some text which might be surrounded by brackets?
Just match against "<?" and ">?" for the bracket zero or more times.
($match) = $string =~ /<?(ab)>?/;
In reply to Re: Help with Regular Expression matching
by skx
in thread Help with Regular Expression matching
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |