Category "regex"

Java Regex Groups within groups

I'm struggling with regex since an hour now. So, just below this is my text I want to parse. AddAgenda("Gangster's agenda", { TEAM_HITMAN, TEAM_POLI

Structural pattern matching using regex

I have a string that I'm trying to validate against a few regex patterns and I was hoping since Pattern matching is available in 3.10, I might be able to use th

Using regular expressions to filter a given substring from a full string

Objective The goal is to extract the substrings TEST_CASE and RESULT from the string | TEST_CASE | RESULT | using regular expressions. A possible solution As

Vim Regex: How do I match a literal "greater than" (">") / "less than" ("<") symbol?

Vim. Regex. How do I match this > and this <.

How to dynamically add escape character for any character in javascript?

I have got p element with some text. In this text in HTML code I use some "escape" characters like \n, \?, \t, etc. When I get the string in JS code, it is trea

Python : Extract mails from the string of filenames

I want to get the mail from the filenames. Here is a set of examples of filenames : string1 = "[email protected]_2022-05-11T11_59_58+00_00.pdf" strin

Extract URL until whitespace or <br> tag using Regex with Javascript

I have a string like: Webcam recording https://www.example.com/?id=456&code=123 or like: Webcam recording https://www.example.com/?id=456&code=123<b

Regex. Get string beetwen two brakets (python)

I'm new in regular expressions and I have some problems with understanding it. Here are some input strings: Coven - GLAM (Lager - IPL (India Pale Lager). ABV 5.

Swift - Getting only AlphaNumeric Characters from String

I'm trying to create an internal function for the String class to get only AlphaNumeric characters and return a string. I'm running into a few errors with how t

How to make regex that matches a number with commas for every three digits?

I am a beginner in Python and in regular expressions and now I try to deal with one exercise, that sound like that: How would you write a regex that matches

How to optimize a regular expression match search in Python

The Program I am building a program that tracks which feature file steps are covered by a step definition. For example, I may have a feature step that is I sho

Renaming namespaces on C# according to the last folder in the file path

I am trying to create a snippet that names a namespace in C# using the name of the last directory in the file path, but it returns everything that comes before

java regex for UUID

I want to parse a String which has UUID in the below format "&lt;urn:uuid:4324e9d5-8d1f-442c-96a4-6146640da7ce&gt;" 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)+^((?