Problem : In the simplified example, there are two regular expressions, one case sensitive, the other not. The idea would […]
Tag: regex
Regex using word boundary but word ends with a . (period)
Problem : want to match word i.v. case insensitive have pattern (?i)bi.v. but want a word boundary on the end […]
How regular expression OR operator is evaluated
Problem : In T-SQL I have generated UNIQUEIDENTIFIER using NEWID() function. For example: 723952A7-96C6-421F-961F-80E66A4F29D2 Then, all dashes (-) are removed […]
Regex ‘or’ operator avoid repetition
Problem : How can I use the or operator while not allowing repetition? In other words the regex: (word1|word2|word3)+ will […]
How to write a regular expression pattern that is capable of validating URIs?
Problem : How does one go about authoring a Regular Expression that matches against all strings that are valid URIs, […]
Why does this backreference not work inside a lookbehind?
Problem : Matching a repeated character in regex is simple with a backreference: (.)1 Test it here. However, I would […]
Parsing extra characters from Datetime
Problem : Hi I have following code that reads the date from a file. using (var reader = new StreamReader(@”C:myfile.txt”)) […]
Detect email in text using regex
Problem : I want to detect emails in text format so that I can put an anchor tag over them […]
Convert result of matches from regex into list of string
Problem : How can I convert the list of match result from regex into List<string>? I have this function but […]
How does MatchEvaluator in Regex.Replace work?
Problem : This is the input string 23x * y34x2. I want to insert ” * ” (star surrounded by […]