Re: extfs/iso9660.in



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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]