Can anyone help with the regular expression for BOFC Order WD+2; 0198

I need to identify the email subject like below

BOFC Order WD+2; 0198

where it starts with "BOFC Order WD+2; " space followed by semicolon(;).
I need to identify the the whole subject.

I tried with below regular expression it’s working good if i exclude symbol “+” form subject.
Regex : ^BOFC Order WD2; (\d{4})(.)(\w)
When i tried placing “+” symbol in regex it’s not working.

So, i need regex which return the exact
BOFC Order WD+2; 0198
after matching with regex.
Can you anyone help.

@srikanthmadireddy78 - please try this…

^BOFC Order WD+2; (\d{4})

If its dynamic subject line, pls let me know we have to build a better pattern…

only last four digits 0198 are dynamic remanings text is static.

1 Like

@srikanthmadireddy78 - Cool then. Please mark as solution , if it solves your query.

Maybe you can try this : BOFC Order WD\W2; \d{4} , with \W it will manage the “+” symbol
I used Regex 101 to try the formula

1 Like