Match text between single quotes, double quotes, or no quotes at all

I’m trying to parse CLI-like arguments that could be enclosed in single quotes, double quotes, or no quotes at all. Here’s an example of what I’m trying to get: // –message “This is a ‘quoted’ …

WIX Velo – Extracting Domain from User Email – Regex Issue

I am trying to retrieve the domain of my site users in order to assign them specific organisation based privileges. If their email address is email@example.com, I want to extract example. If it’s …

How can I remove occurrences with random hash?

I have a controlled in my React application where the user would type. I want to keep track on it and replace the occurrences of $.text and $.lang to random hashes/number. from let …

Regex match any characters in string, up until next match

I have this string: title: one description: two and want to split it into groups like [title: one, description: two] options.match(/(title|description):.+?/gi) this was my attempt, but it only …

Extract URLs from paragraph or block of text using a regular expression

I have a text and a script var x = “This is an example url http://www.longurl.com/?a=example@gmail.com&x=y1 and this must me a example url”; function getMatch(str) { var urlRegex = ‘(?!…

How to replace Unicode characters in the following scenario using javascript?

How to replace Unicode characters in the following scenario using javascript? Using javascript I want to replace Unicode characters with a wrapper according to their style. If possible include a range …

Regex for numbers with spaces and + sign in front

If i want to accept only numbers then i will use this regex ^[0-9]*$ but the problem here is that the numbers like +1 00 are not catched and my regex will show that it is invalid The user needs to …

Regular expression to convert html class to attribute

Is there any way to use regular expression alone or with help of javascript to do the following from

to <div type="c" class="red blue&…

Convert html raw text into inline text (remove spaces) Regex Javascript

I try to convert the html text into inline text without spaces between tags or between text inside tag but without text losing the spaces. Check the code below for more infos. This is my html from …

do you know how to modify the regex to allow one ‘-‘ char at the beginning of the string

i have the existing regex pattern: /^-?(?!0d)d+.?d*$/, Currently the above regex do not allow – char at beginning of the string Do you know how to modify the regex to also allow one ‘-‘ input …