Note that this only sets $1 if X is present.$string =~ /((?<=X)\S+)/;
In reply to Re: Capturing everything after an optional character in a regex?
by Roger
in thread Capturing everything after an optional character in a regex?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |