Category "regex"

How to strip ending date from string using Regex? - SQL

I want to format the strings in a table column, in a specific format. Input table: file_paths my-file-path/wefw/wefw/2022-03-20 my-file-path/wefw/2022-01-02 my-

How can I remove extra spaces, special characters, and make string lowercase?

I'm pretty bad at Regex (C#), so I break things down into parts. The goal of the following series of Regex statements is to take an arbitrary string and reduce

Regular Expressions: Strings of an even length in which all the 'o’s (if any) come before all the 'g’s (if any)

I'm pretty new to regular expressions so I could use some help. Right now I have: (oo|og)+(oo|gg|og|go)* for the alphabet = {o,g} which I made from a previous t

Efficient algorithm for finding matching regular expressions given some text

I have a large set (tens of thousands) of regular expressions defined by text and star symbol (matching subsequent characters 0 or more times). Given some text

How can I extract the numbers from this string?

The question I'm asking is in string1: string1 <- "We have to extract these numbers 12, 47, 48 The integers numbers are also interesting: 189 2036 314 \',\'

regex for accepting a-z letters and composite keys in angular

i like to limit input to accept only [a-z] letters and also composite keys like ctrl+A , ctrl+C , etc to handle natural behavior of html input . how can i do it

Regex : matches all 7 digit number except the one that starts with abc

ex: abc:1234567,cd:2345678,efg:3456789012 expected outcome 2345678 I tried (?!abc)\d{7,7} my result: 1234567

Regex : matches all 7 digit number except the one that starts with abc

ex: abc:1234567,cd:2345678,efg:3456789012 expected outcome 2345678 I tried (?!abc)\d{7,7} my result: 1234567

AWK command to read value from Json

I want to read a value using awk command from below json by giving the key name as input, can you please help me on this "[{\"key\":\"ResourceClass\",\"value\":

How to use non-ascii characters in the regex filter of the declarativeNetRequest API for a Google Chrome extension?

I am creating a Chrome extension but just found out that it's not possible to use non-ascii characters in the regex filter of the declarativeNetRequest API. Whi

How do I match this pattern using preg_match in PHP?

I'm writing a simple quiz engine in PHP and supply the question text in this format question|correct/feedback|wrong/feedback|wrong/feedback There can be as man

regex matching consecutive characters from start and end

Im trying to match a string to that containsthree consecutive characters at the beginning of the line and the same six consecutive characters at the end. for e

Get JSON value using grep, sed, or awk

I have a JSON configuration file I'm trying to extract values from via the following grep command: grep -oP '"private_key": "\K[^\"]*' config.json As you can s

Data validation to Keep column I cell Empty if Condition Met in column J

Trying to add Data validation in column where first value before / >139 OR Last value after / >89 then Data Validation will strict the cell to add anythi

How to specify input locations parameter in dataflow pipeline?

I have a Dataflow template, that I originally created via Dataprep. Now I want to move away from Dataprep and use just Dataflow and schedule jobs using Cloud Sc

How can i check for only one occurence only of each provided symbol?

I have a provided array of symbols, which can be different. For instance, like this - ['@']. One occurrence of each symbol is a mandatory. But in a string there

Regex to match Python docstrings

I would like to parse Python docstrings as follows: Summary of class that is multiple lines. Parameters ---------- param1 : str Param 1 is a param Returns

Using Regular Expression to narrow down dictionary based on Wordle rules

I am trying to do Wordle Solver as my resume project. I want to develop some word suggestions by narrowing down dictionary of words using RegEx. Is it possible

Regex for a extracting a string starting with a particular word and ending with a year

INPUT 1: The string is enclosed CASE NO.: Appeal (civil) 648 of 2007 in between. OUTPUT 1: Appeal (civil) 648 of 2007 INPUT 2: The string is enclosed CASE NO.:

How to remove space from number followed by unit or dimensions?

Here is the input string string1 = 0.9% SODIUM CHLORIDE 8290306544 FLUSH 0.9 % SYRINGE 10 ML string2 = 0.9% SODIUM CHLORIDE 8290-3071-44 FLUSH 0.9 % SYRINGE 10