I am searching for a RegEx for prices.
So it should be X numbers in front, than a “,” and at the end 2 numbers max.
Can someone support me and post it please?
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.
In what language are you going to use it?
It should be something like:
Explaination:
X number in front is:
^\d+where^means the start of the string,\dmeans a digit and+means one or moreWe use group
()with a question mark, a?means: match what is inside the group one or no times.inside the group there is
,\d{1,2}, the,is the comma you wrote,\dis still a digit{1,2}means match the previous digit one or two times.The final
$matches the end of the string.