bug-cfengine
[Top][All Lists]
Advanced

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

Is POSIX regex really implemented?


From: Elmar Kurgpold
Subject: Is POSIX regex really implemented?
Date: Thu, 22 Feb 2001 19:01:36 -0800 (PST)

Maybe I am interpreting the documentation wrong (it's been know to
happen), but I can't get many of the extended regexes to work as described
in the Tutorial, under the "Regular expressions" section.  I've always
avoided and worked around this, but now's the time to speak up. :-)  I
don't think this has worked in any version between 1.5.3 and 1.6.3.  Below
is a sample test script, as always.


--- cut here ---
control:
       actionsequence = ( editfiles )
       scratchdir = ( /tmp )

editfiles:
    any::
    { $(scratchdir)/regex.test
      AutoCreate
      EmptyEntireFilePlease
      AppendIfNoSuchLine "boundary1 boundary bbboundary"
      AppendIfNoSuchLine "white         space (<-- space tab)"
      AppendIfNoSuchLine "123 456 789"
    }

    { $(scratchdir)/dollar.foo
      ReplaceAll "\bboundary\b"        With "YES"
      ReplaceAll "white[:blank:]space"  With "YES"
      ReplaceAll "(123|789)"  With "YES"
    }
--- cut here ---


|  Elmar Kurgpold
|  Email: address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]