Unknown modifier error in php regex
I have blocks of free text that contain multiple 3 digit prices that I
need to capture. Optionally these start with a '$' or alternatively a
space
I have :
preg_match_all("|[\s|\$][\d]{3}|", $html, $prices);
This is giving me:
Severity: Warning
Message: preg_match_all(): Unknown modifier '$'
How can I fix this?
No comments:
Post a Comment