Category "regex"

java regex for UUID

I want to parse a String which has UUID in the below format "<urn:uuid:4324e9d5-8d1f-442c-96a4-6146640da7ce>" I have tried it parsing in below

Javascript Regex to match value of JSON key value pair

Given the following key value pairs, how could I match just the values (including the quotes)? Explanation: I'm doing a find and replace in my IDE. I have hund

Match single unknown parameter php (Morse-code Regex)

I have an function that checks if string( parameter) matches values in an array and returns an array of possibilities key function find_possible_match( $criter

Regex for getting region and lang from url /xx/xx in two groups

I have a url structure where the first subdirectory is the region and then the second optional one is the language overide: https://example.com/no/en I'm trying

Regex ignore first x characters and then match pattern

String = '111111111111100000000000000000001100000000000000111111111111111111111111111111111100111111111111100000111100000111111111111100000000000111111111111111

Pad number with variable length zeroes using REGEX

I have a situation where client inputs a number, and I need to validate that number by padding a certain number of zeroes in front of it. The max length of the

regex to remove number (year only) from string

I know the regex that separates two words as following: input: 'WonderWorld' output: 'Wonder World' "WonderWorld".replace(/([A-Z])/g, ' $1'); Now I am l

Is there a general regex method can combine those conditions?

In my code, I use four four regex conditions but it is too long, so is there simple or general method can combine these conditions? I tried to r'[(abc|def)+^((?

search and replace with regex to increment numbers in Visual Studio Code

I'm currently working on a big svg sprite. The diffrent images are always 2000px apart. What I have is: <g transform="translate(0,0)"> <g transform="

Replace text using RegEx in Excel-VBA

I have data in Excel like follows (one row here - one cell in Excel): 07 July 2015 12:02 – 14 July 2015 17:02 12 August 2015 22:02 – 01 September 2

How to compose two calls to Regex::replace_all?

Regex::replace_all has the signature fn (text: &str) -> Cow<str>. How would two calls to this be written, f(g(x)), giving the same signature? Here'

Domain Name Regex Including IDN Characters c#

I want my domain name to not contain more than one consecutive (.), '/' or any other special characters. But it can contain IDN Characters such as Á, 

Placing Commas Between Names

I am trying to find out if certain patterns appear within a data frame. Suppose I have the following "dictionary of patterns" (notice "james" vs "jamesj"): patt

regex remove line breaks between double quotes without affecting other line break (eager match)

I have a map (key, value pairs) and few of these values have line breaks within them (inside double quotes) which is causing issues in CSS. How can I remove the

Java Mongodb regex query

I have to run this query in Java db.Users.find({"name": /^ind/i}) My Java code is Document findQuery = new Document(); findQuery.append("name", Pattern.co

Regular expression for words not starting or ending with vowels?

I used this regex: ^[aeiou](\w|\s)*[aeiou]$ for words starting and ending with vowels and it works fine. But when I use this regex: ^[^aeiou](\w|\s)*[^aeiou]$

Regular Expression to search longest word in a string

I have a string: var str = "Lorem ipsum dolor sit amet, consectetur adipiscing elit"; Is there a way to find the longest word in a string using regex? This w

Regex matched text between tags is too greedy

I am trying to extract text from a string, and have trouble with laziness/greediness. In the example I want the piece of text to match <b>I want this pie

Regex finding models from product list

I am trying to retrieve the product models from a list of product titles. Since it is difficult to retrieve model from title, I decided starting from getting s

Chronic ripgrep / vim Plugin Error on Load: "-complete Used Without -nargs"?

I recently added ripgrep to my list of vim plugins and, immediately after installation, I began receiving this error message whenever I loaded up vim: Error det