Category "regex"

perl match nested regex and write back to file

I have a txt file and I would like to match a certain pattern and convert a numeric field from decimal to hex and write back existing file using perl. Before Wi

How do I not allow special characters and space in react hook using yup

Here's the code: { label: "Name", name: "name", placeholder: 'Name', type: "text", rule: yup.string() .required('Name is a r

Two groups of alphanumeric characters (including letters, numbers, and underscores) separated by one or more whitespace characters

Fill in the code to check if the text passed has at least 2 groups of alphanumeric characters (including letters, numbers, and underscores) separated by one or

Mimicking negative lookbehind to match a pattern not immediately preceded with a specific character in JavaScript regex

I have this regex in Javascript: 0x[A-F0-9]{2}\g I would like to modify that in order to get a match when the previous character IS NOT a \. Something like t

Reverse each word with uppercase without changing word

How do I reverse each uppercase and lowercase ("I am A Great human") to ("I ma A Taerg namuh")? This is the code I Have: function wordsReverse(str) { let wo

Flutter Dart: RegEx to extract URLs from a String

This is my string: window.urlVideo = 'https://node34.vidstreamcdn.com/hls/5d59908aea5aa101a054dec2a1cd3aff/5d59908aea5aa101a054dec2a1cd3aff.playlist.m3u8';

Why is an underscore (_) not regarded as a non-word character?

Why is an underscore (_) not regarded as a non-word character? This regexp \W matches all non-word character but not the underscore.

Migrate docker-compose nginx.conf to kubernetes nginx ingress

I am trying to convert my docker-compose nginx.conf to kubernetes nginx ingress controller. This is my nginx.conf that i am using with docker-compose. server {

Regex: capturing capital word with nothing in front of it

I'm trying to match all proper nouns in some given text. So far I've got (?<![.?!]\s|^)(?<!\“)[A-Z][a-z]+ which ignores capital words preceded by a

Django subdomain rewrite using uwsgi on Google Cloud Run

I am moving a Django site to GCP and using Google Cloud Run for the first time. The experience is great. I was also very pleased with the domain mapping feature

How to make a regular expression for IPv6 with prefix?

I created this very complex regular expression(RegEx101) for IPv4 and IPv6 ((^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-

Only postive integers in input field in react

I have a input field for price and quantity and I want to restrict it to have only +ve integers. I don't want to do any kind of validation like the type=number

regex pattern for table structure string

see this i am struggle with match the pattern with empty column. my regex pattern look like ^(.*?\$).*?(\w\:\\.*?)\s(.*?)$. this pattern match the not empty

Scrabble :Assume that you are trying to complete a crossword puzzle

In a crossword puzzle, some letters are given and we have to figure out which complete word can we make out of it. For example, given letters "cwd"in the same o

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&apos;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