Regular Expressions Part 03

Hi All, from two previous posts we talked about regular expressions. From this post I’m going to show you some examples of regular expressions using in the real world. Please refer following twp posts to get an idea about regex if you don’t have,

  1. regex part 01
  2. regex part 02

Let’s see few examples,

  • To match html tags.


  • For a trim function.



  • To match IP address


  • To match numbers with decimal


  • To match a date


  • To match a line containing a given word


  • To match a line not containing a given word


  • To match words duplicate near


For three blog posts we talked about regulal expressions. From previous two posts we learnt regular expressions and from this post we did some examples. So I hope now you have a clear idea about regular expressions. See you soon with another interesting topic. Thank You!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s