onyourmark
asked on
regular expression
I have a bunch of urls like
http://www.travelpod.com/travel-blog-entries/bassalleckj/japan_se_asia07/1191895200/tpod.htm
and I want to reduce them to end at the .com/
I don't want all the extra subdirectory information and page information like
travel-blog-entries/bassal leckj/japa n_se_asia0 7/11918952 00/tpod.ht m
to be there. So in the above example I just want
http://www.travelpod.com/
Can someone give me the regular expression for this? I am using notepad++ regular expression engine.
Thanks!
http://www.travelpod.com/travel-blog-entries/bassalleckj/japan_se_asia07/1191895200/tpod.htm
and I want to reduce them to end at the .com/
I don't want all the extra subdirectory information and page information like
travel-blog-entries/bassal
to be there. So in the above example I just want
http://www.travelpod.com/
Can someone give me the regular expression for this? I am using notepad++ regular expression engine.
Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ASKER
Sorry, you are right. It works! Thanks.
ASKER
http://[A-Z0-9.]+/
I get the beginning but I want to delete the rest of the url and just have the beginning. How could I do that?
Thanks.
Have things like:
http://arishaintokyo.wordpress.com/
http://www.travelpod.com/travel-blog-entries/bassalleckj/japan_se_asia07/1191895200/tpod.html
http://travelguide.globaltraveling.net/best-cheap-hotels-rates-in-tokyo/
http://tokyocheap.org/5-best-places-to-celebrate-the-new-year/
http://www.downloadbox.org/movies/tokyo-train-girls-private-lessons-2009-dvdrip_74616.html
http://www.indierockreviews.com/2011/03/tokyo-police-club-2011-tour-dates/
http://www.flickr.com/photos/benoist/5512962333/