Announcement

Collapse
No announcement yet.

Text replacement does not handle regular expressions

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Text replacement does not handle regular expressions

    Hello,

    I have a problem with respect to the text compare and text replacement feature. While I was able to successfully apply regular expressions in grammar elements (text importance), I was not able to apply regular expressions in the text replacement.

    For example, I have two files:

    A.txt including just the string "2013" and
    B.txt including just the string "2014".

    I can now ignore the difference by defining a grammar object "201\d" using a regular expression.

    But if I define the replacement rule "2013" --> "201\d", the difference is not ignored. (The rule "2013" --> "2014" works, however.)

    Could you help me implementing replacement rules with regular expressions?

    (I use the pro edition, version 3.3.8, build 16340.)

    Best regards,
    Mirco

  • #2
    Hello,

    In the Replacement Item dialog, the Text to Find textbox supports Regular Expressions (see the dropdown arrow button next to it to see which), while the Replace With textbox supports Tagged Expressions but not other RegEx.

    You can use the Side option to determine if the Find text RegEx is on the Left or the Right.

    If you define the Replacement as
    201\d
    to
    2013
    With the side option for Right, does this work for you?
    Aaron P Scooter Software

    Comment


    • #3
      Hello,

      yes, thank you very much!

      Best regards,
      Mirco

      Comment

      Working...
      X