x Did you like it? Well, then please consider making a donation :)

Regex (or Regexp), Regular Expressions - is a special set of rules that forms a search mask/pattern (mainly for use in work with strings: match, split, replace). Regular expressions are useful in parsing data from text files, websites (html code), xml etc. .NET Regex c#Regular expressions provide a high-power, flexible, and efficient method for processing text: for example get all email addresses from html-file or delete all phone numbers in a text document. The extensive pattern-matching notation of regular expressions enables you to quickly parse large amounts of text to find specific character patterns; to validate text to ensure that it matches a predefined pattern (such as an http link); to parse / extract, replace, edit or delete text substrings; and to add the extracted strings to a collection in order to generate a report. For many applications that deal with strings or that parse large blocks of text, regular expressions are an indispensable tool. Many programming languages provide regular expression capabilities, some built-in, for example Perl, JavaScript, Ruby, AWK, and Tcl, and others via a standard library, for example .NET C#, VB.NET, Java, Python etc.

Each character in a regular expression is either understood to be a metacharacter with its special meaning, or a regular character with its literal meaning. Together, they can be used to identify textual material of a given pattern, or process a number of instances of it that can vary from a precise equality to a very general similarity of the pattern. The pattern sequence itself is an expression that is a statement in a language designed specifically to represent prescribed targets in the most concise and flexible way to direct the automation of text processing of general text files, specific textual forms, or of random input strings. A very simple use of a regular expression would be to locate the same word spelled two different ways in a text editor.

A regex (regular expression) is a pattern that the regular expression engine attempts to match in input text. A pattern consists of one or more character literals, operators, or constructs. For a brief introduction, see .NET Framework Regular Expressions. Each section in this quick reference lists a particular category of characters, operators, and constructs that you can use to define regular expressions: anchors, backreference, character escapes, character classes, grouping constructs, quantifiers, substitutions, options and other.

The System.Text.RegularExpressions namespace contains set of classes that provide access to the .NET Framework regular expression engine. The namespace provides .NET regex functionality that may be used from any platform or language that runs within the Microsoft .NET Framework: C#, VB.NET. Learn more: Wikipedia, Microsoft MSDN, Help and Library.

If else condition on minus sign

If numbers are negative then length of numbers is 11 otherwise 12

4/14/2016 10:23:59 PM
Numbers from 0 to 100

Validate numbers from 0 to 100

4/14/2016 9:24:49 PM
Numbers from 0 to 100

Validate numbers from 0 to 100

4/14/2016 9:24:47 PM
Regex.Matches, Regular Expression for hexadecimal number

Matches expression starting with a 0, following by either a lower or uppercase x, followed by one or more characters in the ranges 0-9, or a-f, or A-F.

8/14/2015 1:07:13 PM

borderlands.wiki add template param

1/12/2017 9:58:57 PM
Remove "Style" attribute from HTML tags

Remove all "style" attributes from HTML text.

8/12/2015 5:47:50 PM
How do I replace multiple spaces with a single space?

Replace multiple spaces example

7/12/2015 4:10:18 PM
Remove all non alphanumeric characters from a string except dash & space symbol

Replace this Regex with an empty string + Compiled flag

7/12/2015 3:52:40 PM

Split string to get Date and text

I have to process text file like that: text 01/01/1970 text 02/01/1970 ... etc. I want the output to be the following data: according to the docs, wrapping the string you're splitting on in () (making it a capture group) will result in these captures being included in the array.

8/12/2015 4:38:43 PM
Splitting Link using RegEx

i want to find category from the link. I am breaking the link into array using Regex.

3/31/2015 5:40:43 PM
Simple Regex.Split sample - remove digits

User \d+ for remove digits and \D+ for remove text.

3/30/2015 12:45:18 AM

Last REFERAL links

10/17/2019 11:55:04 AMhttps://www.bing.com/ regex #1,  regex #2,  regex #3,  regex #425
10/10/2019 11:07:16 PMhttp://www.bing.com/search?q=System.Text.RegularExpressions+.net+standard&form=MSNH14&sc=8-4&sp=-1&qs=n&sk= regex #14
9/27/2019 2:45:54 AMhttps://tw.search.yahoo.com/ regex #11
9/26/2019 4:31:20 AMhttp://qaru.site/questions/327568/regexsplit-on-comma-space-or-semi-colon-delimitted-string regex #1,  regex #23
9/25/2019 3:40:26 AMhttps://cn.bing.com/ regex #12
9/20/2019 5:36:31 AMhttp:// regex #12
8/27/2019 10:07:32 AMhttps://7ooo.ru/ regex #1,  regex #2,  regex #3,  regex #4,  regex #5,  regex #6,  regex #7,  regex #8,  regex #9,  regex #10,  regex #1122
8/18/2019 8:33:25 AMhttp://qaru.site/questions/145460/get-all-links-on-html-page regex #117
8/4/2019 9:54:02 AMhttp://www.baidu.com/s?wd=finallyjck regex #11
8/3/2019 5:23:40 AMhttp://www.baidu.com/s?wd=W3BD regex #11
8/1/2019 12:22:37 PMhttps://search.yahoo.com/ regex #1,  regex #2,  regex #3,  regex #411
7/31/2019 12:03:08 PMhttp://www.baidu.com/s?wd=whistlesw3 regex #11
6/22/2019 10:45:00 PMhttp://www.bing.com/search?q=System.Text.RegularExpressions.Match&form=MSNH14&sc=8-4&sp=-1&qs=n&sk= regex #14
6/20/2019 12:50:07 PMhttp://www.bing.com/search?q=System.Text.RegularExpressions&form=MSNH14&sc=8-4&sp=-1&qs=n&sk= regex #14
6/18/2019 8:55:55 AMhttp://www.baidu.com/s?wd=organized63m regex #11
6/15/2019 4:42:51 PMhttp://www.baidu.com/s?wd=properlye5v regex #11
6/13/2019 12:52:24 PMhttp://www.baidu.com/s?wd=washh81 regex #11
5/23/2019 4:15:40 AMhttp://www.baidu.com/s?wd=NBHS regex #11
5/20/2019 9:06:27 PMhttp://www.baidu.com/s?wd=beaninm regex #11
5/17/2019 2:16:58 AMhttps://www.qwant.com/ regex #12
5/12/2019 1:29:14 AMhttp://www.baidu.com/s?wd=loss4l2 regex #11
5/4/2019 4:17:35 AMhttp://www.baidu.com/s?wd=KGHO regex #11
5/2/2019 3:55:51 PMhttp://www.baidu.com/s?wd=chickendeq regex #11
5/2/2019 4:24:32 AMhttps://duckduckgo.com/ regex #1,  regex #2,  regex #3,  regex #4,  regex #5,  regex #612
4/30/2019 3:04:00 PMhttp://www.baidu.com/s?wd=dress51h regex #11
4/29/2019 6:02:30 AMhttp://www.baidu.com/s?wd=redzl2 regex #11
4/7/2019 10:05:10 AMhttp://www.baidu.com/s?wd=melted69g regex #11
3/11/2019 12:33:17 AMhttp://www.bing.com/search?q=System.Text.RegularExpressions+C%23&form=MSNH14&sc=8-4&sp=-1&qs=n&sk= regex #14
2/3/2019 7:10:34 PMhttp://www.bing.com/search?q=system.text.regularexpressions.regex.ismatch+phone+parentesis&form=MSNH14&sc=8-4&sp=-1&qs=n&sk= regex #14
1/2/2019 12:39:43 PMhttp://www.bing.com/search?q=vb.net regex match \w&qs=n&form=QBRE&sp=-1&pq=vb.net regex match \w&sc=1-21&sk=&cvid=4965CEFC4A99444286BCEC5F74600CC1 regex #11