Get rid of the url part of the name

A swapping-ground for Regular Expression syntax

Get rid of the url part of the name

Postby DiaVerv » Mon Nov 28, 2016 4:20 pm

I want to exclude all the url part of the name and keep only the part before url's occurance.
i.e.
for the name:
dd(20160625) hh(163602'') -tt DIA TO MATCH Nobel Prize Awarded To Scientists Who Identified The Brains GPS System IFLScience - httpwww.iflscience.combrainnobel-prize-awarded-scientists-who-identified-brains-gps-system.url

end result:
dd(20160625) hh(163602'') -tt DIA TO MATCH Nobel Prize Awarded To Scientists Who Identified The Brains GPS System IFLScience - .url

notes
the portion to exclude always start with http and all the files end with .url
DiaVerv
 
Posts: 2
Joined: Mon Nov 28, 2016 4:13 pm

Re: Get rid of the url part of the name

Postby KenP » Mon Nov 28, 2016 5:31 pm

This should do what you want.

RegEx (1)
Match: (.*)(http.*)
Replace: \1
KenP
 
Posts: 199
Joined: Sat Jul 30, 2016 11:25 am

Re: Get rid of the url part of the name

Postby DiaVerv » Fri Dec 02, 2016 5:59 pm

Yes, it works!!!
DiaVerv
 
Posts: 2
Joined: Mon Nov 28, 2016 4:13 pm


Return to Regular Expressions