Tell me how I can replace a single regular expression other
a simple regular expression. I have got an example, a text file with lines
Code: Select all
G:/1/gusi_lebedi/gisi_lebedi1.htm
G:/1/guravlj_tsaplja/guravlj_tsaplja.htm
G:/1/gribok_teremok/gribok_teremok.htm
Code: Select all
G:/([^"]+)/([^"]+)/([^"]+).htm
Code: Select all
G:/$1/$2/
Code: Select all
G:/1/gusi_lebedi/
G:/1/guravlj_tsaplja/
G:/1/gribok_teremok/
Code: Select all
G:/1/gusi_lebedi/../../gisi_lebedi1.htm
G:/1/guravlj_tsaplja/guravlj_tsaplja.htm
G:/1/gribok_teremok/../../../gribok_teremok.htm
then this filter should be changed each time
Have you got scheme of a regular expression that will allow
get this, same result
Code: Select all
G:/1/gusi_lebedi/
G:/1/guravlj_tsaplja/
G:/1/gribok_teremok/
directories in the chain.
Thank you.