Category "regex"

regular expression to match exactly 5 digits

testing= testing.match(/(\d{5})/g); I'm reading a full html into variable. From the variable, want to grab out all numbers with the pattern of exactly 5 digit

Improving the performance of an PCRE Regex Pattern

I have the below regex here which is written to support the PRCE/PRCE2 format. However, this throws the following error “Evaluation takes too long. Please

How to match a word with no special character at front and back

I am trying to match a word which has no special characters attached at both front and back. The regex I have written is /\btest\b/gi

RegExp Match all text parts except given words

I have a text and I need to match all text parts except given words with regexp For example if text is ' Something went wrong and I could not do any

Regex : match ass \fn font tag

I want to match all \fn tags with the following font name, so for : \fnArial\i1 \fnArial \b1\fnArial) \t(\fnJester (BIG)) \t(\fnJester (BIG))\i1 \t(\fnJest

Getting overlapping regex matches in C#

I have the regex 1(0*)1 and the test string 1000010001 I want to have 2 matches, but I find that only 1 gets found : var regex = new Regex("1(0*)1"); var valu

Creating anchors for footnotes in markdown

I help publish articles on history, archeology, toponymy, etc. The texts are scientific and they always have a lot of references to the literature used (anchors

Different Java Regex matching behavior when using UNICODE_CHARACTER_CLASS flag

I was testing the behavior of the Pattern.UNICODE_CHARACTER_CLASS flag for different punctuation characters and noticed that the matches for grave accent charac

How to replace my current regular expression without using negative lookbehind

I have the following regular expression which matches on all double quotes besides those that are escaped: i.e: The regular expression is as follows: ((?<![

Regex match all word pairs

I am trying to get all the word pairs out of a piece of text. I have the following regular expression (\w+) +(\w+) that I run on a piece of text with no punctua

Match string from beginning to end of string

import re text = "A random\string here" test = re.findall('(?<=A ).+\s', text) I want to print out everything from the end of "A" (excluding the space) to

Extract subtring using regex python

Hello I have this string and I need extract from this some sub strings according some delimiters: string = """ 1538 a 123 skua456 789 5 g 15563 blu55g b 456 164

how to extract string inside single quotes using python script

Have a set of string as follows text:u'MUC-EC-099_SC-Memory-01_TC-25' text:u'MUC-EC-099_SC-Memory-01_TC-26' text:u'MUC-EC-099_SC-Memory-01_TC-27' These data

Wordpress query search 's' exact word

I see this question has been posted multiple times but all of the examples I've tried are not working. I want to limit the search by keywords to only search for

How do I build a Regexp that doesn't care about positions

I'm making a Scrabble game with HTML and Javascript and I'd like to add a "hint word" feature based on the player's rack. I have a dictionary array with the val

Regex to filter out Datetime time from string

Requirement: I am receiving an email with a template and I need to filter out some text from the email. I am converting all the email body text as a string. ema

Replace character inside double curly brackets regex

I'm trying to replace - character with _ inside a double curly brackets. Example inputs: Hello {{first-name}}, how are you? The event {{event-name-address}} Exa

Search and replace in 1 step instead of 3 with Vim regex

I have this code that I'd like to transform: const createFacebookAdVideoPayload = { const accountId = faker.datatype.uuid(); const pu

Regex to match multiple numbers within string

I have a regex that looks like this to extract order numbers from columns: df["Orders"].str.extract('([0-9]{9,10}[/+ #_;.-]?)') The orders column can look like

REGEX: Transpose each word from a google sheet cell and put them one under the other (rows)

I need to extract each word (phrase) within a cell in google sheets and put each one under the other in a column (row for each one). I have a regex code that w