Skip to main content

RegEx

HI,
I have a string like this:
AR 2016 INTREO Office roll-out - Preliminary Study
and I need to match the characters only having this result
AR INTREO Office roll out Preliminary Study
 
I have tried with
@RegExpr(CLIENT,"([^0-9-]+$") returns INTREO Office roll-out - Preliminary Study
and
@RegExpr(CLIENT,"([^0-9-]+") returns AR
 
I have also to combine the other expression with "OR" operator but did not work.
 
 

Brian Element Mon, 05/18/2020 - 12:56

Hi Vito,

I would use the following on your file - @Strip(@JustLetters(DATA))

This will return ARINTREOOfficerolloutPreliminaryStudy that you can then search for.  You can also use an @upper() or @lower() to remove any possible problem with mix case.

scotchy33 Thu, 05/21/2020 - 18:01

In reply to by Vito Piepoli

Another way would be to use some combination of isin or isini
@if(@isini("AR ", client)=1, @if(@isini(" intreo ", client)>1,@if(@isini(" office", client)>1, 1,0)))
@if(@isini("AR ", client)=1, @if(@isini(" intreo ", client)>1,@if(@isini(" office", client)>1, "TRUE", "FALSE")))