IBM Support

PM46812: regular expression change in behaviour since v8.3

A fix is available

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • Run the following DXL once and observe the result, a match will
    not be found. The main problem here is that in previous versions
    of DOORS (8.3) this code worked. The change presumably ocurred
    in v9.1 when the regular expression engine was changed.
    
    Interestingly, regExp2() behaves in the same way.
    
    There is potentially a further problem...
    
    Now change the value of the 'toto' string to be
    'V2.3.1P;V2.4.1'. The match will correctly be found as 'V2.4.1'.
    
    Now revert the 'toto' string back to 'V2.3.1P'. This time the
    match will be found, correctly as 'V2.3.1P'.
    
    
    '
    string linkNextValue(string ?s)
    {
        string result = ''
        Regexp hasField = regexp '(^|[ ,;\t\n]*)([^,;\t\n]*[^
    ,;\t\n])($|[ ,;\t\n]+)'
    
        while ((null result) and (! null s))
        {
            hasField s
            result = s[match 2]
            s = s[end(0)+1:]
        }
    
        return result
    }
    
    string toto = 'V2.3.1P'
    string strApplicability
    
    while (!null toto)
    {
            strApplicability = linkNextValue(toto)
    }
    
    print '?'
    print strApplicability
    print '?'
    '
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    Run the following DXL once and observe the result, a match
    will not be found. The main problem here is that in previous
    versions of DOORS (8.3) this code worked. The change
    presumably ocurred in v9.1 when the regular expression
    engine was changed.
    
    Interestingly, regExp2() behaves in the same way.
    
    There is potentially a further problem...
    
    Now change the value of the "toto" string to be
    "V2.3.1P;V2.4.1". The match will correctly be found as
    "V2.4.1".
    
    Now revert the "toto" string back to "V2.3.1P". This time
    the match will be found, correctly as "V2.3.1P".
    
    
    "
    string linkNextValue(string ?s)
    {
        string result = ""
        Regexp hasField = regexp "(^|[ ,;\t\n]*)([^,;\t\n]*[^
    ,;\t\n])($|[ ,;\t\n]+)"
    
        while ((null result) and (! null s))
        {
     hasField s
     result = s[match 2]
     s = s[end(0)+1:]
        }
    
        return result
    }
    
    string toto = "V2.3.1P"
    string strApplicability
    
    while (!null toto)
    {
     strApplicability = linkNextValue(toto)
    }
    
    print "?"
    print strApplicability
    print "?"
    "
    

Problem conclusion

  • The code has been changed so that the match is now found
    

Temporary fix

Comments

APAR Information

  • APAR number

    PM46812

  • Reported component name

    TLOGIC DOORS

  • Reported component ID

    5724V61DR

  • Reported release

    920

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2011-08-31

  • Closed date

    2012-06-06

  • Last modified date

    2012-06-06

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    TLOGIC DOORS

  • Fixed component ID

    5724V61DR

Applicable component levels

  • R920 PSN

       UP



Document information

More support for: Rational DOORS

Software version: 9.2

Reference #: PM46812

Modified date: 06 June 2012