Announcement

Collapse
No announcement yet.

Regular expression help

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • Regular expression help

    Hi,

    I'm comparing attached two files & trying to form a replacement for <Style ss:ID="...."> with the corresponding counterpart on the other side. But I am not able to generate a regular expression which will do the job. Could somebody help. Attached - a.txt, b.txt.
    FYI,
    I tried all below possibilities -
    L E F T S I D E = R I G H T S I D E
    1. \<Style ss:ID=".*"\> = \<Style ss:ID=".*"\>
    2. \<Style ss:ID="s\d*"\> = \<Style ss:ID="s\d*"\>
    3. <Style ss:ID="s\d*"> = <Style ss:ID="s\d*">
    4. <Style.*> = <Style.*>

  • #2
    You can't use replacements for this. Replacements have to go from a regular expression match to a specific target text. To handle these files you should just mark the <Style.*> tags as unimportant.
    Zoë P Scooter Software

    Comment


    • #3
      Thanks Craig for the quick reply. I couldn't find the option to mark something as unimportant. Under Session Settings I see that I can mention the stuff I want as important but not unimportant. How do I go about it?

      Comment


      • #4
        You'll need to edit the file format instead of the session settings. In the file format dialog there's a "Grammar" tab where you can define different bits of texts various element types. Once you have something defined as a grammar element you can mark it as unimportant in the session settings.
        Zoë P Scooter Software

        Comment


        • #5
          Thanks Craig. I get it now.

          Comment

          Working...
          X
          😀
          🥰
          🤢
          😎
          😡
          👍
          👎