Tips n Tracks

  • Increase font size
  • Default font size
  • Decrease font size
  • default color
  • black color

Reference

Sample image

Microsoft .NET Framework Get Details.

Sample image

Microsoft .NET Framework Get Details.

Reference

Sample image Microsoft .NET Framework Get Details.
Sample image

Microsoft .NET Framework Get Details.


Regular Expression

Finding Variations in a Words using regular expressions with .net


Finding Variations in a Words (like John, Johny, Jon, Jonathan) using regular expressions with .net

In this regular expression we are going to find out variations in a Words like John, Johny, Jon, Jonathan. Just take a look at above words they all same begining "jo".

Regular Expression Pattern

\b[jJ]o\w*\b

A description of the regular expression:

First or last character in a word
Any character in this class: [jJ]
o\w*\b
o
Alphanumeric, any number of repetitions
First or last character in a word

Sucessful Matches

John
Johny
Jon
Jonathan
joiee


Read the rest of this entry »

Finding words or String with same beginning and end using regular expressions with .net


Finding words or String with same beginning and end using regular expressions with .net

In this regular expression we are going to find words or String with same beginning and end. Means we are going to search words like xerox with same beginning and end "x".

Regular Expression Pattern

\b(?<First>\w{1,})(?<Second>\w+)(?(Second)\k<First>)\b

A description of the regular expression:

  First or last character in a word
  [First]: A named capture group. [\w{1,}]
      Alphanumeric, at least 1 repetitions
  [Second]: A named capture group. [\w+]
      Alphanumeric, one or more repetitions
  Conditional Expression with "Yes" clause only
      Did the capture named [Second] match?
      If yes, search for [\k<First>]
          Backreference to capture named: First
  First or last character in a word

Sucessful Matches

xerox
404
rotor
rotor
ISAPI


Read the rest of this entry »

Finding all words starting with “re” using regular expressions with .net


Finding all words starting with "re" using regular expressions with .net

In this regular expression we are going to find all words starting with "re". Means we are going to search words beginning(first two character) will be "re".

Regular Expression Pattern

(\bre)\w+\b

A description of the regular expression:

[1]: A numbered capture group. [\bre]
\bre
First or last character in a word
re
\w+\b
Alphanumeric, one or more repetitions
First or last character in a word

Sucessful Matches

replace
regex
regular


Read the rest of this entry »

Finding all words ending with “ing” using regular expressions with .net


Finding all words ending with "ing" using regular expressions with .net

In this regular expression we are going to find all words ending with "ing". Means we are going to search words ending(last three character) will be "ing".

Regular Expression Pattern

\b\w+(ing\b)

A description of the regular expression:

\b\w+
First or last character in a word
Alphanumeric, one or more repetitions
[1]: A numbered capture group. [ing\b]
ing\b
ing
First or last character in a word

Sucessful Matches

processing
programming
scripting


Read the rest of this entry »

Text and Data Manipulation with Regular Expressions in .NET Development


Text and Data Manipulation with Regular Expressions in .NET Development

Regular expressions(or regex) is a language used for more sophisticated form and text processing. They are often used to perform complex search-and-replace operations, and to validate that text data is well-formed. Today, regular expressions are supported by most programming languages, as well as many scripting languages (like Perl, ASP, Visual Basic, .NET, C#, Java, JSP, PHP,Python, ColdFusion, Tcl, Ruby and many other languages), editors (EmEditor, TextPad), applications (Microsoft Word, Microsoft Excel, StarOffice, OpenOffice), databases(MySQL, SQL Server), and command-line tools.

Here we see a hands on approach to solve the needs of the majority of RegEx to manipulate data. I have try my best to provide ready to use source for lattest version of ASP.NET, VB.NET, C#.NET. All the example described here are tested with Visual Studio 2008. I have try to cover all important and mostly used regular expressions. If you face with any error or you have new idea which needed to be cover here. Please drop your feedback for me. Ok!, let’s get started…


Read the rest of this entry »