perl -e '$string="abcX123"; $string =~ /.*X(\S+)/; print $1;'
I do not understand why you are using X?
In reply to Re: Capturing everything after an optional character in a regex?
by podian
in thread Capturing everything after an optional character in a regex?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |