in reply to Capturing everything after an optional character in a regex?
perl -e '$string="abcX123"; $string =~ /.*X(\S+)/; print $1;' [download]
I do not understand why you are using X?