I now validate email addresses like so: [-+.'\w]+@[-.\w]+\.[-.\w]+ Which means that if users accidentally have a trailing or leading space in that address (
I recently switched to Rails 4 and the security requirements no longer seem to allow the use of regular expressions in the style of /^..$/. The error states th
I have this regex (?:$|^| )(one|common|word|or|another)(?:$|^| ) which matches fine unless the two words are next to each other. One one's more word'word commo
I need to validate if the value a user enters is one of the following: a 7 digit number ranging from 7000000 - 7999999 a 9 digit number ranging from 777000000
I need to prevent entering 5 digit sequential numbers like 12345, 45678 etc. in a text box. I had tried with the following regular expression, but it is not wor
Password cannot contain white spaces must contain at least one numeric char must contain 1 capital letter and be at least 8 characters in length, max 15 this is
A simplified example: Using this regular expression /^(?:(a)(b)|(c)(d))$/.exec(value); results in an array of 5 elements if matching, either ["ab", "a", "b"
How to convert string with emoji ❤️😬, convert emoji to string like this question url %EF%B8%8F with regex? function emojitourl(str) { r
I want to remove the "" around a String. e.g. if the String is: "I am here" then I want to output only I am here.
I'm trying to write a Javascript function to find indices of all occurrences of a word in a text document. Currently this is what I have-- //function that find
I am importing user data from a foreign database on demand. While i keep house numbers separate from the street names, the other database does not. I use preg
I have written logic to extract dates of experiences from the resume. I have extracted experiences that have this format : 01/2017 - 04/2022 01/07/2017 - 31/07/
I want to split std::string by regex. I have found some solutions on Stackoverflow, but most of them are splitting string by single space or using external lib
I have in a page 2 textboxes with the exact same RegularExpressionValidator. First case The page is loaded. I enter in Hour1 : 88:88 and Hour2 : 77:77. The seco
I want to check if a string is STRICTLY ALPHANUMERIC in javascript. i have tried this: var Exp = /^[0-9a-z]+$/; if(!pwd.match(Exp)) alert("ERROR") But the pr
I need to validate a date string for the format dd/mm/yyyy with a regular expresssion. This regex validates dd/mm/yyyy, but not the invalid dates like 31/02/45
I'm trying to replace the tab with 4 spaces, using sed, but it is not working. Here is my code: sed -i '{s/\t/ \{4\}/g}' filename Any suggestion is apprecia
I want to parse HLS master m3u8 file and get the bandwidth, resolution and file name from it. Currently i am using String parsing to search string for some patt
I have a money value as "R$ 2.200,00" where my thousand separators are . and my decimal separator is ,. I would like um regex to transform this string into a va
Hi I have a following regexp and value 2> re:run("first second", "^(?<foo>\\w+) (?<bar>\\w+)$", [{capture, [foo, bar], list}]). {match,["first",