Use () to catch the end portion: m{ _ ([^_]+) $ }x. Then use the portion captured in replacement via $1. And, RTFM.
In reply to Re: regex to rename last _ with ,
by Anonymous Monk
in thread regex to rename last _ with ,
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |