I have a bunch of files name MOV***.mpg.flv where *** is random letters/numbers. I have a text file with each file name on a separate line. I want to search for each file name and replace that with
<a href="Michigan/MOV***.flv">
<strong>MOV***.flv</strong>
</a>
I got it to recognize the MOV***.flv part but I can't get it to replace it with what I want.
I used MOV.*\.mpg\.flv to find the string but now I need to replace what it found with the above..
Anyone help?
Thanks a lot.
Help with regular expressions
Re: Help with regular expressions
Do you have to rename file names?
Do you you want to replace it in your text file?
I suppose that you have one text file with file names in it
and you want to replace all file names in it with your text including HTML tags.
So please explain what do you need?
Give us sample text file and resulting file as it should be.
Do you you want to replace it in your text file?
I suppose that you have one text file with file names in it
and you want to replace all file names in it with your text including HTML tags.
So please explain what do you need?
Give us sample text file and resulting file as it should be.
Re: Help with regular expressions
I don't want to rename any of the files actually. See below for the file names.
I want to add this:
and it would look like this for example:
to all of the files. So where it says MOV***.flv is the file name from the list below. Does that explanation help anymore?
I want to add this:
Code: Select all
<a href="Michigan/MOV***.flv">
<strong>MOV***.flv</strong>
</a>
Code: Select all
<a href="Michigan/MOV0F5.flv">
<strong>MOV0F5.flv</strong>
</a>
Code: Select all
MOV0F5.flv
MOV0F8.flv
MOV0FB.flv
MOV0FE.flv
MOV101.flv
MOV104.flv
Re: Help with regular expressions
Go to Batch replace tab, check on "Use regular expressions".
Put into the grid, search for:
MOV.*\.flv
Replace with:
<a href="Michigan/$0">\r\n\r\n<strong>$0</strong>\r\n</a>
That's all I verified it works perfectly.
Put into the grid, search for:
MOV.*\.flv
Replace with:
<a href="Michigan/$0">\r\n\r\n<strong>$0</strong>\r\n</a>
That's all I verified it works perfectly.
Re: Help with regular expressions
Thanks Works like a charm.