That last part is only true for some versions of awk. POSIX says the
results are undefined, and some awks report such uses as an error:
Solaris:
$ echo foo | awk '/foo{/'
awk: /foo{/: syntax error Context is:
>>> /foo{/ <<<
$ echo foo | awk '/foo{x}/'
awk: /foo{x}/: syntax error Context is:
>>> /foo{x}/ <<<
HP-UX:
$ echo foo | awk '/foo{/'
awk: There is a regular expression error.
{} imbalance.
The source line number is 1.
The error context is
>>> /foo{/ <<<
$ echo foo | awk '/foo{x}/'
awk: There is a regular expression error.
Invalid {} repetition.
The source line number is 1.
The error context is
>>> /foo{x}/ <<<
--
Geoff Clare <
net...@gclare.org.uk>