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

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


Meaning of JavaScript text between two slashes

What it the meaning of this text? This is neither a comment, nor HTML text.<script type="text/javascript"> /text/</script>

View Article

Getting a specific text from a website using Regex in Shortcuts

I’m trying to create a Shortcut on iOS that uses Regex, what I’m trying to accomplish is getting the price of a product from a website but no matter what Regex commands I use don’t work. It would be...

View Article


Why isn't the "or" operator being escaped in the Javascript regular...

I'm trying to check if there is a value between 'mystring' and the end character (which is a pipe). But new RegExp('mystring:.+\|').test('bla')Evaluates to true, even though I am escaping the '|'...

View Article

issues with regular expression [closed]

I have a string that should be validated to be in the form of something like "Readdata.v5". What I do in my code, is I split the string based on the . (I check to make sure there is exactly one . in...

View Article


How to NPM search with regex?

trying to list all packages available in private registry with npm search /.* --jsonBut output is empty [].Doc says I can use RegEx.If a term starts with /, then it's interpreted as a regular...

View Article

Having trouble with regular expressions [closed]

I have two questions:1)function LongestWord(sen) { var word = /[^\W\d]([a-z]+)[$\W\d]/gi; var answer = word.exec(sen); return answer;}console.log(LongestWord("9hi3"));Why does this return [hi3, i] as...

View Article

How to write a PDO parameterized query with multiple REGEXP conditions

I am having a problem with using REGEXP in my SQL query using PDO method. When I execute the statement I get nothing from the DB. I want to be protected from SQL Injections and I am just learning it.If...

View Article
Browsing index pages (9611 articles)


Latest Images