$sting =~ m{\b # word boundary ( \S+ # word before '(' \s* # spaces if any \( [^\)]+ # '(' inside of ')' \) ) [^\)]* # some not ')' chars if any $ # end of string ancor }x; $result = $1;
Upd: comments added
In reply to Re: The last occurrence
by ccn
in thread The last occurrence
by Scarborough
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |