Quantcast
Channel: Active questions tagged regex - Stack Overflow
Browsing index pages (9618 articles)
↧

Vim regex for matching strings

How can I create a regex for Vim that accommodates for matching multiple double quotes strings on one line, without matching the text in between the two double quotes strings? A restriction on the...

View Article


Regular Expression Check for Capital Names in PostgreSQL

I have a database, which holds many first names, occurring like the following pattern:The name can consist of many first names (like double, or triple names), separated by either a '-' or a ''.Each of...

View Article


C# Regex.Split: Removing empty results

I am working on an application which imports thousands of lines where every line has a format like this:|* 9070183020 |04.02.2011 |107222 |M/S SUNNY MEDICOS |GHAZIABAD | 32,768.00 |I am using the...

View Article

How to get the expansions from a glob pattern to use in another path

The ProblemI want to create a function in Python for finding and moving files where I can specify a glob-style pattern to find source files, and then a second pattern to describe where to move them to....

View Article

extract medicine name and dose with regex pattern

I would like to extract medical information in text that has the following formatSTRING (CHAR - STRING - STRING - [STRING - STRING - STRING]) for example:OLANZAPINE 10 MG - ORODISPERSIBLE TABLET (S -...

View Article


Regex with optional whitespace/dot combination [closed]

My regex is:/X1( ?C?(arbon)? (Gen(\.? ?)\b([0-9]|[1][0-3])\b))/giTesting it, it's OK withX1 Carbon Gen.8X1 Carbon Gen 8but not with:X1 Carbon Gen8Why and how to include Gen.8 into the findings?

View Article

Graylog Search with strings containing /

I have logs which contains in full_message;-EndPoint:example/example/abc-EndPoint:example/example/qfdsf-EndPoint:example/example.. and so onI am trying to write a search query to just get...

View Article

SQL Regular expression to split a column (string) to multiple rows based on...

I have to split a column to multiple rows. The column stores string, and we have to split delimiter based on '/n'Have written the below query. But not able to specify ^[/n]. The other 'n' in the string...

View Article


Regular expression that is false if it matches and true if it doesn't

For a specific situation I need to build a regexp that does this:It must search a given Text for the existence of a given string,It must not return any match (i.e. logical false) if it finds the string...

View Article


Regex to match start and middle of a string to parse Content-Type header

I'm trying to break a string into groups where the start and optional middle are matched, and also the part before and after the optional middle is captured in a group.This is my work-in-progress RegEx...

View Article

Understand REGEX with options [closed]

The basic string is T18 Gen.2.How can I find also similar ones (NOT case sensitive) havingT18s OR T18 s instead of T18Gen instead of Gen.3 OR 4 OR 5 OR 6 instead of 2Thank you!

View Article

How to fix checkmarx Trust Boundary Violation

I persist a value from user input request. Checkmarx complains there is Trust Boundary Violation.gets user input from element request. This element’s value flows through the code without being properly...

View Article

Regex replace group reference and Unicode escape conflict

I am working on a latin to N'ko translator.I get a warning for this type of code:text=re.sub(r'([ߊߍߋߌߐߏߎ][\u07F2]*)\u0300','\g<1>\u07EC',text,0,re.UNICODE|re.MULTILINE)SyntaxWarning: invalid...

View Article


Regex to check for a number in the url using Twig

This wouldnt be a big problem if I had known Twig a little more.Here is my code, I am trying to check whether the url contains number in it.{% set x = req.path %}{% set matches =...

View Article

How to align text to the right with notepad++?

I have text like this:1;a;3;;2;abc;4;;3;abcde;5;;I want to align texts to the right with notepad++, so become like this: 1;a;3;; 2;abc;4;;3;abcde;5;;How to do this?

View Article


"MongoServerError: unknown operator: $expr" when trying to use $expr in...

I have a searchQuery object with field names as keys and strings as values that I would like to use to .findMany() any document matching them in my MongoDb collection (using Node.js). However it isn't...

View Article

How to get domain name from URL

How can I fetch a domain name from a URL String?Examples:+----------------------+------------+| input | output |+----------------------+------------+| www.google.com | google || www.mail.yahoo.com |...

View Article


Fastest way to remove extra blank space - in VBA excel

I'm searching the fastest way to remove [multiple] blank spaces in a string, to output in a cell afterwards. There can be 1, 2 3, X space characters.*example: "hello world how are you"*My process is...

View Article

How can I extract the track ID from a Spotify URL using JavaScript?

I’m building a web application that accepts Spotify track URLs. I need to extract the track ID from URLs such as:https://open.spotify.com/track/6rqhFgbbKwnb9MLmUQDhG6How can I extract the track ID...

View Article

How to spell the “/” (slash) character inside a regular expression?

I would like to replace all / characters in a string.What is the regex for that?someString = 'I dont know the name of / in english. :/ ';anotherString = someString.replace(///g, ')');

View Article
Browsing index pages (9618 articles)


Latest Images