/^\s*(?:#|$)/
is the same as
/^\s*#/ || /^\s*$/
while
/^\s*#|$/
is the same as
/^\s*#/ || /$/
In reply to Re: Explain regex ?: usage in grouping
by ikegami
in thread Explain regex ?: usage in grouping
by plc
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |