Flag This Hub

effective regular expression on eclipse by smart programmer

By


Introduction Regular Expression

Hi All,

        Here I just want to tell about how we can use regular expressions on eclipse programming tool.If we use regular expression on eclipse it will improve our productivity on coding.It reduces some manual work while we doing coding.Here I am going to explain about some basic regular expression that I have used in eclipse.I am sure it will also help you.

Example 1: Removing numbers in a text file

In this example I am going show how we can remove numbers in text file.Regular expression for finding  a number  is \d .For finding more than one numbers example(2323,232,23) the expression is [\d]+. Here '[' and ']' characters are used to group characters.'+' symbol indicates that characters in the square bracket can be repeated more than one time.And "*" symbol indicates that characters can be repeated 0 or more times.

Example text : 123 is one twenty three

After replacing : is one twenty three

Regular Expression :[\d]+

Example 1:Removing numbers in text file.Before remove

See all 3 photos

Examle 1:Removing numbers with Regual expressin dialog box

Examle 1:Removing numbers after replacement

Comments

No comments yet.

Submit a Comment
Members and Guests

Sign in or sign up and post using a hubpages account.



    Like this Hub?
    Please wait working