Replies: 1 comment 1 reply
-
|
Regular expression are very powerful but oftentimes complicated to get right. "[A-Za-z][A-Za-z]NG" matches strings like XXXXNG because it still contains the pattern XXNG in the middle. What you need is a little token There are handy pages like this that you can use to build and test your regular expressions. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, sorry for this basic question, but I want to filter with regex in my SpineToolbox importer.
I want to keep only strings that have two letters + "NG" (e.g. XXNGXX, LYNGCC_Misurata_CC, etc...), and filter out the other strings, for instance strings like XXXNG (i.e. more than two letters before NG).
I thought this was the way (it's what I understood from wikipedia)

"[A-Za-z][A-Za-z]NG"
But this does not filter out the XXXXNG.
What would be the correct way in SpineToolbox?
Beta Was this translation helpful? Give feedback.
All reactions