Regex question | how to return value before a phrase

Options
Greg_703914
Greg_703914 Posts: 42
edited April 2021 in Questions

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

Answers

  • Greg_703914
    Greg_703914 Posts: 42
    edited April 2021
    Options

    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.

  • Greg_703914
    Options

    @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.

  • Aly_142377
    Aly_142377 Posts: 18 admin
    Options

    @Greg_703914 glad to hear things are working for you now!