I want to capture only 136.50
in the following
$136.50 (was $195.00)
I'm trying to use a negative lookbehind in order not to group a price if it is preceded by another price. This is what I have:
(?<!\$.+)\$(?<price>[\d.,]+)
what am I doing wrong?
EDIT: I think the problem might be that I can't use a variable length string inside a lookaround, but I'm not sure how to construct the regex without one.
EDIT: There will sometimes be only one price, in which case I want to group that price. This is why I did not use a positive lookahead to confirm a price is the first price.