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 ArticleHow 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 Articleextract 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 ArticleRegex 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 ArticleGraylog 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 ArticleSQL 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 ArticleRegular 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 ArticleRegex 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 ArticleUnderstand 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 ArticleHow 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 ArticleRegex 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 ArticleRegex 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 ArticleHow 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 ArticleHow 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 ArticleFastest 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 ArticleHow 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 ArticleHow 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 ArticleMeaning 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 ArticleGetting 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