extfs/iso9660.in

Roland Illig roland.illig at gmx.de
Thu Oct 28 13:27:29 UTC 2004


Leonard den Ottolander wrote:
> Hello Roland,
> 
> 
>>> > -  irx = "^\[ *[0-9]+ +[0-9]+\]  ";
>>> > +  irx = "^\\[ *[0-9]+ +[0-9]+\\]  ";
>>
>>The problem was that the output of isoinfo -l on FreeBSD is different
>>than on Linux. The committed code has thus changed into:
>>
>>+  irx = "^\\[ *[0-9]* +[0-9]+\\]  ";
> 
> 
> Sorry. Committed code is
> 
> +  irx = "^\[ *[0-9]* +[0-9]+\]  ";
> 
> Why do you want to introduce an extra backslash? It's the bracket I want
> to escape.

The question is: Escape from what?

The first interpretation of the string is done by awk, parsing the 
string literal. This converts the string "\[" into the string "[". The 
second interpretation is done by the regex compiler which sees a single 
"[", not a "\[" as intended. Therefore the "\\[" is necessary.

Roland



More information about the mc-devel mailing list