We have incoming data in a text field that looks like these examples:
HIKE: Hike name here - 3 Hikers
HIKE: Other hike name here - 12 Hikers
HIKE: 10th Anniversary Hike name - 1 Hikers
I would like to create a dictionary that pulls out the number of hikers so that it can be put in an RE attribute that takes only numbers. So, in the cases above:
A few notes:
The closest I've gotten is to create a RegEx to return everything after the hyphen and space. So:
Replacement Value: --BLANK--
Values to Match on: .*(?<=- )
But I need to have only a numerical value in this field. How do I also get rid of " Hikers"? I'm sure I need to take a different approach.
Add a second line to your dictionary to remove " hikers"
Oh my goodness. That did it. I was so close!
I am very new to RegEx but this does feel like a bit of a face palm moment.
Thank you, Barbara.