Tip of the day

02 Mar

Hi folks,

Today i am posting here some snippet of the code, which will return you the string in between the two tags  (starting and ending of the tag). Use the below code as plugin in you application.

public static void main(String[] args) {
    String s = “<b>bbbb</b><e>eeee</e><a>aaa</a><z>zzz</z>”;
    Pattern p = Pattern.compile(“<e>(.*?)</e>”);
    Matcher m = p.matcher(s);
    if (m.find()) {
       System.out.println(; //eeee

Hope this code save your valuable time.

Get glued to know more updates.

Have a nice day 🙂

Leave a comment

Posted by on March 2, 2013 in Uncategorized


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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: