Note that if you want to match the dollar character and you are using a double quoted string for defining the pattern, you should use \$ but you need to escape both the backslash and the dollar sign itself.
This is because inside a double quoted string PHP will interpret the \$ sequence as a single $ character.
To match "$5.00" in "I owe you $5.00 exactly", the "/\$5\.00/" pattern will become "/$5\.00" that it is not the desired pattern. It should be "/\\\$5\.00/" that will become "/\$5\.00/".
My recommendation is to always keep this in mind or use single quoted strings, because single quotes has less escape sequences interpreted.