RegEx

4 posts / 0 new
Last post
Vito Piepoli
Offline
Joined: 08/15/2019 - 15:16
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's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

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.

Vito Piepoli
Offline
Joined: 08/15/2019 - 15:16

Thank you very much Brian.
 
Regards,
 
Vito

scotchy33
Offline
Joined: 09/05/2012 - 15:51

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")))