This is my attempt, but it’s not working. I’m so rusty at regex these days so I have no idea what’s wrong with it. Any help?
$pattern = '/-\$[.*]$/';
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need to put the
*outside of the[](or better yet, use a+).Try
'/-\$[0-9\.]+/':Or, if -$7.50 will always be at the end of the line: