This question already has answers here:
How can I validate an email address using a regular expression?
(79 answers)
Closed 5 years ago.
Can anybody share Regular Expression below example:
minimum 3 alphanumeric and then add only one '#' then again minimum 3 alphanumeric
example: rohit#tcs or himansu#infosys
Here is a pattern that matches:
/\w{3,}#{1}\w{3,}$/
Related
This question already has answers here:
How can I replace a regex substring match in Javascript?
(4 answers)
How to replace captured groups only?
(7 answers)
Closed 3 years ago.
I was wondering, what is the best way to implement the following case:
vm.elasticQuery = userQuery.replace(/~='[a-zA-Z]+'/g,':*[a-zA-Z]+*')
In other words, I would like to replace every pattern that looks like this ~='SomeLetters' to a pattern that looks like this :*SomeLetters*. Take into account that I do not want to remove/change the alphabets but only the outside.
Your help is appriciated.
This question already has answers here:
JavaScript regular expression "Nothing to repeat" error
(2 answers)
Why do regex constructors need to be double escaped?
(5 answers)
Closed 3 years ago.
I trying to identify regular expression in JS. Expression which wrote to identify the pattern is working in Online RegEx but when i use it in my own Code it does not work.
it says error .*|{1}/: Nothing to repeat
This is Expression -
Examples:\n.*\|{1}
Sample Data -
Examples:
|asda| asd|asd|adasda|adaasdsaasdasdsa|adsadsa|asdasdad|asdasdsd|asda |
Examples:
|Word| asd|asd|W#132|iam|GOto|asdasdad|asdasdsd|asda- |
This question already has answers here:
How to escape backslash in JavaScript?
(2 answers)
Backslashes - Regular Expression - Javascript
(2 answers)
Can't escape the backslash with regex?
(7 answers)
Closed 4 years ago.
I want a custom validation for an input box and tried with this. /^[a-zA-Z0-9\,/.-\s]*$/ It will allow only the following special characters , . / - and blank space. I want to add one more special character and that is \ How can I achieve this.
This question already has answers here:
Javascript: Split a string into array matching parameters
(3 answers)
Closed 4 years ago.
I have this regular expression that tokenizes calculator input strings like 12+3.4x5 to 12,+,3.4,x,5
The regular expression used is
\d+\.?\d+|[\+-÷x]
I get an unexpected match with ^ and letters.
Regex solution, although there's probably a cleaner way of writing this if someone could point it out?
(\d+\.?\d+|\d+|(\+|-|÷|x))
This question already has answers here:
My regex is matching too much. How do I make it stop? [duplicate]
(5 answers)
Closed 6 years ago.
I have this string
§serverUrl§/image/?url=§externalMedia.data.image§
and I want to match only the string inside the § character.
(serverUrl and externalMedia.data.image).
I'm using this pattern :
/§.+§/g
but it catches also the characheters between the two groups.
Any help would be appreciate. Thanks
You will have to make it lazy using ? like this §.+?§
Regex101 Demo