I have a test string "apple search from here apple, banana, apple." and the following RegEx (?i)(?<=search from here\s)(\bapple|banana|orange\b)(\s ...
I have a test string "apple search from here apple, banana, apple." and the following RegEx (?i)(?<=search from here\s)(\bapple|banana|orange\b)(\s ...
As a new programmer, I am working on a problem that tells me to turn an array of 10 ints into a formatted string phone number that looks like this: (9 ...
I'm trying to category_id for purely numeric values, this works. I need to also capture category_name. For category_name, I need to capture until spac ...
Is there a limit to the number of capture groups in a regular expression? I used to think it was 9 ($1 ... $9), but haven't found anything in the perl ...
I have a lob describing the rows of a CSV, and of course each column is delimited by a semicolon. Some of that colum are strings, delimited by pipes, ...
I'm facing a stupid problem... I know how to use Pattern and Matcher objects to capture a group in Java. However, I cannot find a way to use them wit ...
I have a piece of HTML markup, for which I need to add a specific CSS rule to it. The HTML is like this: As you can see td already contains a style ...
I am reading 'Build RESTful APIs with ASP.NET Web API' article. I keyed F12, opened Developer Tools window in Internet Explorer but I could not find ...
I have several regexp with capturing and obviously the capturing variable retains the value of the last valid capturing: The output is: Here the ...
I am trying to use regular expressions in Java to capture data from the following string: SettingName = "Value1",0x2,3,"Value4 contains spaces", "Va ...
I need a regEx to remove all ( and ) from a string, except those between two @. Example: The string I need: I tried something with this non-cap ...
I have an XML file and need to find and replace all occurrences of a certain pattern enclosed between either of two pairs of tags, but not mixed betwe ...
Let's say that you have a string: You're trying to verify that the tenth is a non-whitespace character, and that the twentieth character is the sam ...
I tried using (?P<Time>.+)\,\s(?P<Station>.+), but it did not capture the first line. The sample strings aree: Tested at regex101.com: ...
I'm working on text files with Windows line terminators (\r\n), on Linux with Perl v5.30. Something that I don't understand is why, with these text f ...
I wanted to match for a string which starts with a '#', then matches everything until it matches the character that follows '#'. This can be achieved ...
I have the following string where I want to match the valid <key>:<value> pairs. A valid <key> is anything with a non-whitespace ch ...
In Perl (v5.30.0), regex are evaluated as the captures, when used as parameters of print(): # Simplified example; the real case has more text, and th ...
Using PostgreSQL, I am unable to design the correct regex pattern to achieve the desired output of an SQL statement that uses regexp_replace. My sour ...
I am using named capturing groups using (?P<name>) with a list of verbs and word stems related to the coronavirus pandemic. When there is a m ...