Regex question | how to return value before a phrase
I need to return the number values before a phrase. In this case I need a way to return the number 30 before the phrase " discount on frame". In future cases it may be 20 or 25 instead of 30 and there can be less than 4 values to return.
Example: https://regex101.com/r/lngUrY/1
Best Answer
-
Hi @Greg_703914 ! Does this regex achieve your desired result?
(\d+)\D* discount on frame
2
Answers
-
I think normally it would work, but the custom action we use for this does something to the regex code and modifies it. Would you like me to put a link to the custom action or the run where I tested this? I was told to post these in community, but without being able to reference our specific workflow this will get difficult.
0 -
@Aly_142377 At first I could not get this to work because it took some extra configuration since we have a unique process. I was able to get this to work. Thank you for your help.
0 -
@Greg_703914 glad to hear things are working for you now!
0