Currently, I’m using regex in Javascript / Node via find() and that works for finding the beginning of the pattern. But I’d also like to be able to find out where the pattern ends. Is that possible?
Share
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.
If you use the
RegExp.exec()method, you can get the information you need./\d+\.?\d*|\.\d+/is equivalent tonew RegExp("\\d+\\.?|\\.\\d+"). The literal syntax saves some backslashes.