And it always matches nothing when I use the former 2 examples.$var=~/(?:regex(catch_this)|)/; # My regex or nothing I've also tried: $var=~/(?:regex(catch_this)|.{0})/; #My regex or very literally nothin +g It always matches my regex when it looks like this: $var=~/regex(catch_this)/;
In reply to Regex OR'ing by spectre
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |