Post Reply 
[Req] Match 1 or more directory path levels
Apr. 23, 2015, 03:09 AM (This post was last modified: Apr. 23, 2015 03:17 AM by wammie.)
Post: #1
[Req] Match 1 or more directory path levels
I am looking for a pattern to match 1 or more directory path levels, to replace it with just 1 directory path level.

Examples of directory paths to MATCH (Note - "text with possible spaces between words" refers to unknown text strings, and the number of levels is indeterminate):

http://domain/

http://domain/text with possible spaces between words/

http://domain/text with possible spaces between words/text with possible spaces between words/

http://domain/text with possible spaces between words/text with possible spaces between words/text with possible spaces between words/

REPLACE all matches with http://newdomain/

Another way to express this:

MATCH http://domain/--- anything including "/" or spaces any number of times ---/ (up to the last "/")

REPLACE all matches with http://newdomain/

Thanks to anyone that can help!!
Add Thank You Quote this message in a reply
Post Reply 


Messages In This Thread
[Req] Match 1 or more directory path levels - wammie - Apr. 23, 2015 03:09 AM

Forum Jump: