Operating System - Tru64 Unix
1830207 Members
1925 Online
109999 Solutions
New Discussion

regular expression bug in Tru64 V5.1B 2650 alpha

 
Chris_Mathews
New Member

regular expression bug in Tru64 V5.1B 2650 alpha

can someone please let me know if there is a patch for the problem described below.

The following RE is used to parse a string into sub-fields:

field-1 = open quote
field-2 = quoted value
field-3 = close quote

"^[[:space:]]*text[[:space:]]+([\"']{1})(.*)([\"']{1})[[:space:]]*$"

so the target string:

TEXT "hello world!"

produces:

field-1 = "
field-2 = hello world!
field-3 = "

this has worked fine for many years, but the following target string does not work since we upgraded to V5.1B 2650 alpha:

TEXT "'"

which should produce:

field-1 = "
field-2 = '
field-3 = "

but actually produces:

field-1 = "
field-2 =
field-3 = "

it works if I change the definition for field-1 from (.*) to (.+) but this prevents the use of double quotes around a blank quoted value - eg:

TEXT ""

urgent help required - all help gratefully received.

Cheers - Chris
1 REPLY 1
Chris_Mathews
New Member

Re: regular expression bug in Tru64 V5.1B 2650 alpha

sorry - should have mention I am using the POSIX regcomp() and regexec() calls in C++ with the flags REG_EXTENDED and REG_ICASE


-- Chris