Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Regular expression in query activity

Avatar

Avatar
Validate 25
Level 4
salvdangelo
Level 4

Likes

45 likes

Total Posts

130 posts

Correct Reply

4 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 5
Boost 3
View profile

Avatar
Validate 25
Level 4
salvdangelo
Level 4

Likes

45 likes

Total Posts

130 posts

Correct Reply

4 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 5
Boost 3
View profile
salvdangelo
Level 4

14-02-2018

Hi,

I would like to exclude all those deliveries belonging to MESSAGE CENTER with internal name that ends with "_rt"

regex1.JPG

I cannot use the expression "CONTAINS '_rt' "  because I will get also "notifyStockAlert" for no reason so I am forced to use a regular expression, something like "LIKE '*_rt'  "

Could you tell I should I write this regex ?

Thanks,
Salvatore

Jean-Serge Biron

dattarays70361342

Amy_Wong

Debbie

Jochem van Dieten

clawson

mghalpin

Adobe Campaign

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
MVP
Jean-Serge_Biro
MVP

Likes

353 likes

Total Posts

464 posts

Correct Reply

153 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Validate 1
MVP
Jean-Serge_Biro
MVP

Likes

353 likes

Total Posts

464 posts

Correct Reply

153 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile
Jean-Serge_Biro
MVP

14-02-2018

Hi Salvatore,

Take care, in SQL expressions / SQL RDBS engines, most of time the wildcard specials chars are:

% (and not *) for strings

_ means 1 char to replace

so _rt means art, brt, crt, etc. So the "StockAlert" matches it.

To use the _ sign you must escape it, usually \_ but the syntax may depend on the SQL engine.

Reminder: the SQL expression syntax is not the same than regex syntax (used in Javascript or other development languages).

Regards
J-Serge

Answers (0)