Skip to content
Advertisement

Tag: regex

Regex with double asterisk javascript

I need two regular expressions, one to get ** at the beginning of a string, and one at the end. For example: With an expression obtain the ** of the beginning and with another those of the end. There may be many more repetitions. I have tried the following: Thanks a lot It should mark all the words that contain

Regex expression not returning entire term

The intention of the regex is to capture substrings wrapped between twin expressions in parentheses, kinda like html tags. For example: And here’s my code Can anyone tell me why this doesn’t capture the entire thing? Answer The characters () are special in a regexp and must be escaped with a if you want to match them literally. And

Need regex for project name with the following conditions

Need regex for the “Project name” with following condition. Expected Result: Take alphabetical, alpha numeric, alpha numeric symbolic Actual Result: that is, Everything is allowed but if it is just special characters and no text than it’s a problem. **Example: zjna5726$7&^#bsg //allowed %&*% // just special characters not allowed I tried /^[ A-Za-z0-9_@./#&+-]*$/ but did not help ^([w+d+]+)((-)([w+d+]+))* //did not

Advertisement