I have a string which can come in two different ways. See the example below:
# Option 1
Court Case Fee $214.00
# Option 2
Court Filing Fee: Contract $198.00
I want to build a RegEx that will return the first amount without the dollar sign. For example:
- if the string is the Option 1: 214.00
- if the string is the Option 2: 198.00
I have built this RegEx:
/Court Case Fee|Court Filing Fee: Contract \$(?<court_case_fee>\d+\.\d+)/mi
But is not working since it just returns the value for Option 2. What I am missing here?
Here is the Regex101 so you can play with it: https://regex101.com/r/Od3r6y/1