Category "regex"

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

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