You seem to have already figured out that [ABCD] is semi-equivalent to (A|B|C|D). What do you need help with?
It is more properly equivalent to (?:A|B|C|D). The difference is that (?: ... ) is strictly for grouping and alternation while ( ... ) also captures its contents into a variable that can be accessed with a number like $1, $2, $3, etc.
In reply to Re: regular expression-xerox
by diotalevi
in thread regular expression-xerox
by oz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |