The following regex should be for Do Dollars Dollar or #do #Dollars or #Dollar but not for Doblabla (which it currently is) etc..
/^@(?P<name>\w+) (?P<amount>\d+) [#]?Do(?:llars?)?/i
How do I change that? So that it no longer matches on Dogfood and Dogs etc...
Update 3: Not Solved Afterall:
/^@(?P<name>\w+) (?P<amount>\d+) [#]?(do(?:llars?|s))/i
The following does not match:
@name 2 do
Any thoughts?
My second question is how do I then allow it to also match to: Dox and #Dox
So in the end I want it to match to
@name 2 #do
@name 2 do
@name 2 #dollars
@name 2 dollars
@name 1 dollar
@name 1 #dollar
@name 2 dox
@name 2 #dox
and nothing else.
Thank you very much!
Ice