Skip to main content
Solved

How to filter this words?

  • September 23, 2022
  • 3 replies
  • 10 views

mr_fme
Enthusiast
Forum|alt.badge.img+9

I have one column with this values.

 

I would like to filter only words that contais ABC letters.

 

But can´t be JACABC or RDABC. Sometimes the ABC is stay in second or third word after the comma, like image below:

 

CAP 

Thank´s

Best answer by ebygomm

A string searcher with the following Regex should pass any features where ABC is the start of a string of characters at any point in the string, i.e. will match ABC123 but not JACABC123

\bABC\w+

\b is the word boundary

ABC are the characters ABC

\w+ is any number of word characters following (letter, number, underscore)

 

If you then need the actual matches themselves they are stored in the allmatches list which you can then explode, e.g. the last line in your example would match and return ABC6003 & ABC4

View original
Did this help you find an answer to your question?

3 replies

caracadrian
Contributor
Forum|alt.badge.img+23
  • Contributor
  • September 23, 2022

Use StringReplacer to replace space with nothing AttributeSplitter to split by comma (,), then Tester with Begins with ABC.

I think you need a ListExploder someware.


ebygomm
Influencer
Forum|alt.badge.img+39
  • Influencer
  • Best Answer
  • September 23, 2022

A string searcher with the following Regex should pass any features where ABC is the start of a string of characters at any point in the string, i.e. will match ABC123 but not JACABC123

\bABC\w+

\b is the word boundary

ABC are the characters ABC

\w+ is any number of word characters following (letter, number, underscore)

 

If you then need the actual matches themselves they are stored in the allmatches list which you can then explode, e.g. the last line in your example would match and return ABC6003 & ABC4


mr_fme
Enthusiast
Forum|alt.badge.img+9
  • Author
  • Enthusiast
  • September 23, 2022
ebygomm wrote:

A string searcher with the following Regex should pass any features where ABC is the start of a string of characters at any point in the string, i.e. will match ABC123 but not JACABC123

\bABC\w+

\b is the word boundary

ABC are the characters ABC

\w+ is any number of word characters following (letter, number, underscore)

 

If you then need the actual matches themselves they are stored in the allmatches list which you can then explode, e.g. the last line in your example would match and return ABC6003 & ABC4

Thank you very much!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings