Simple regex...
I want to isolate the number of school buses (in this example). I can do it using \s(\d+\s), but how do I add it to Qty, when Qty exists and is null at the start?
Qty | |
Mobile County Board of Education (Mobile) - $2.16 million to replace 76 school buses. | put 76 here |
Hi @hellyars
If you want to replace only when its null you can use a if block.
if isnull([Qty]) then Regex_replace([Field],"\s(\d)+\s","$1")
else [qty] endif
Is this what you are looking for ? or maybe i am missing the requirement.
Hope this helps : )
@atcodedog05 i tried something like that. The problem is qty is a double. So, i tried wrapping it with a toNumber(), but that also does not seem to work.
Hi @hellyars
It seems to work for me. Can you try this.
Workflow:
If this doesnt work for let me know the issue you are facing.
Hope this helps : )