Regex not matching group at the end of the string, even though $ is included
The string format is similar to:
Why this javascript regex doesn’t work?
I’m doing a small javascript method, which receive a list of point, and I’ve to read those points to create a Polygon in a google map.
Grouping text with regex
consider I have a text like :
Return the sum of all the numbers contained within the string
Instructions
The sumNums function takes a string as an argument. It should return the sum of all the numbers contained within the string. If there are no numbers in the string, sumNums should return 0.
Function should return true if its a professional email and false if it is not
The isProfessionalEmail function takes a string as an argument. This string represents an email. For the purposes of this challenge, an email is considered professional if it is not signed with a kiss (either a x or X).
Regex for matching numbers >= 150,000 with spaces included not working as expected
I’m trying to create a regex that matches numbers greater than or equal to 150 000
, considering spaces as thousand separators. Here is the regex I tried:
Regular expression to match 10 letter string pattern [closed]
Closed 58 secs ago.
RegEx to find string representing local paths
I’m trying to find all strings which are local paths like:
Regex is matching when it is not supposed to be matching
const regex1 = /(1( )?)?(d{3})2d{3}-d{4}/; Javascript.
for those who know regex. I want to check if 1 (555)555-5555 is matched but it is not supposed to be matched. Because the first delimiter is backreferenced, so the second delimiter should be equal to the first one but in my case, it is not. Why is it still returning true? Does anybody know?
JS regex to remove everything between two special characters NOT including the second one
I want to remove part of the string between two special characters (#
and ?
) including the hash character but NOT including the question mark, so url#hash?param=2
becomes url?param=2