Overall meaning of this expression is to print rest of the string after the string "http://www.".
Pattern p = Pattern.compile(regex):-Creating a pattern object and compiles the given regular expression into a pattern.
Matcher m = p.matcher(url):-Creates a matcher for matching the given input against pattern p.
Output of the program
|The url of the roseindia is http://www.roseindia.net.Rohini
Name of the company is : roseindia.net.
If you enjoyed this post then why not add us on Google+? Add us to your Circles
Liked it! Share this Tutorial
Ask Questions? Discuss: Retrieving String after given Regular expression
Post your Comment