Category "regex"

How can I use a regex expression to identify the falses between braces on different lines?

I'm attempting to use the Python re.sub module to replace any instance of false in the example below with "false, \n" local Mission = { start_done = false

How to find equivalent text in another with aggregated text?

Given: const textToFind = 'Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, ' const paragraph = 'Lorem Ipsum has been the

How to negate a regex for pandas replace

In pandas I can search and replace all fields that contain the word fish, for example, using df.replace(r'.*fish.*', 'foo', regex = True). But how do I sear

Java string matching with wildcards

I have a pattern string with a wild card say X (E.g.: abc*). Also I have a set of strings which I have to match against the given pattern. E.g.: abf - false

Remove new lines from JSON

Consider I have the following string: { "{\n <<<-- error \"SomeKey\": {\n \"somevalue\": \"test\",\n, \"AnotherKey\": \"Long string shou

Parsing a user's SAML attributes via Foundry's Multipass or Control Panel

I want to add more metadata to last names in Palantir Foundry's Multipass for our users (for instance, to display Anna Smith, USA (Contractor)). My SAML integra

Apache Camel Split by start and end characters SOH and ETX

I have an spring boot application which have routes.xml being loaded on startup On the routes.xml, i have a MQ queue source that contains sample message SOH{123

Add quote to every item in a Python List

I have the following Python list from BeautifulSoup (for example): [Basketball, Ipad Pro, Macbook Pro, Racket] I need to add quote to every item in the list,

Extract string between combination of words and characters [duplicate]

I would like to keep the strings between (FROM and as), and (From and newline character). Input: FROM some_registry as registry1 FROM another_

Capitalize First Letter of Every Word inside Bracket

I'm trying to write some useful Regex for Tagscanner (a music tagger on Windows) and spent a bunch of time on regex101.com to fulfill my idea. In some language

How to use Grafana dashboard variable in another variables regex?

I created a Grafana dashboard variable and tried to filter the values via the regex field. This works for static regex definition. I would now like to use anot

how to fix this pac file javascript code with regex

I have some strings. 127.0.0.1:46977/safekids/permission_denied.html domain1.com/denied/permission_safekid.html domain2.eu/pkb/1144/niche/denied/permission_

How to make dot match newline characters using regular expressions

I have a string that contains normal characters, white charsets and newline characters between <div> and </div>. This regular expression doesn't wor

How do I remove the special characters within multiple lines in Regex?

I'm trying to solve a problem that wants to display the given text from a file omitting the special characters and modifying the multi-line input to a single-fo

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