I have the following three strings:
>>> s_no = '¥2,571'
>>> s_yes = '$2,57'
>>> s_yes = '2,57 $'
How would I construct a regex to match only the second one? The one I am using so far is:
re.search(r'\,\d{2}[\s|$]?',s) # should start on a comma. Unconcerned what comes before it.
Basically I want it to allow a (1) comma -- (2) then two digits -- (3) then either the end of the string or a space.