Personally I'd use split to split on all matches, then grab the last element from the resulting array. If you need the first part all as one piece, then you can use join to stitch it back together.
In reply to Re: Simple way to split on last match?
by tobyink
in thread Simple way to split on last match?
by aturtle
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |