Non-greedy regular expression does not work?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • swayf
    New User
    • Apr 2010
    • 2

    Non-greedy regular expression does not work?

    First, thank you for the nice software

    I am trying to use custom grammer with next RE:

    ^((?:.*?{5})

    which sould match first 5 fields in ';'-separated values file.
    But it, seems, does not work...

    I have two sorted files to compare. Let say first 5 fields (columns) should be used like 'key' for alignment.. How can I achieve this?

    Thank you
  • Aaron
    Team Scooter
    • Oct 2007
    • 16017

    #2
    Hello,

    Unfortunately, nongreedy (? RegEx is not supported by our grammar engine. You would need to define the section more literally (^[^;]+;[^;]+;[^;]+;[^;]+;[^;]+

    Is your text entirely semi-colon delimited? Does it have a Key column? If so, I would recommend trying out the Data Compare session type. You can define the ; characters as the delimiter, and the Data Compare will then place your text into columns and align by the Key column (default: Column 1). You must have at least 1 key column, and the key column must match exactly. You can define multiple key columns (such as First Name and Last Name) to create a unique identifier. If you need to "move" the key column from column 1, define another column as the Key column first, then remove it.
    Aaron P Scooter Software

    Comment

    Working...