I have a few large files that need adjusting. Hundreds of time I have a string that looks like this:
<ahref="#"onClick="MM_openBrWindow('http://sub.domain.com/folder/folder/folder/Name Of File.htm','intel','scrollbars=no,width=950,height=600');return false">
The "Name Of File" could be anything and consist of 1 to 5 words or so with spaces.
I have tried several option as shown in this forum when I did a search, but no luck yet.
The whole line just needs to be removed, no replace, which I know how to do, if I can implement a wildcard for the "Name Of File" part.
I can do it in several steps if that makes it easier, e.g.:
"http://sub.domain.com/folder/folder/folder/Name Of File.htm" is all that need to be removed and the rest I can do separate.
Please be clear, I have no experience with wildcards.
Thanks, Ron
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello ron,
you'dd better use a regular expression option to do what you want.
It's so powerful to use but a little tricky to learn. You'dd better ask you
best freind Google to learn it or wikipedia " http://en.wikipedia.org/wiki/Regular_expression"
So in Npp, you can search and replace the regexp with "" i.e. nothing.
For me and the above string, I first use:
"2/.*[0-9A-Za-z ( )].htm", with Regalar Expression (sorry, if wrong since my Notepad is in Dutch)
which removes the filename and the 2/ and .htm, so "2/Name Of File.htm" from the above string.
then I just use the normal replace to remove all the rest.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I have a few large files that need adjusting. Hundreds of time I have a string that looks like this:
The "Name Of File" could be anything and consist of 1 to 5 words or so with spaces.
I have tried several option as shown in this forum when I did a search, but no luck yet.
The whole line just needs to be removed, no replace, which I know how to do, if I can implement a wildcard for the "Name Of File" part.
I can do it in several steps if that makes it easier, e.g.:
"http://sub.domain.com/folder/folder/folder/Name Of File.htm" is all that need to be removed and the rest I can do separate.
Please be clear, I have no experience with wildcards.
Thanks, Ron
Hello ron,
you'dd better use a regular expression option to do what you want.
It's so powerful to use but a little tricky to learn. You'dd better ask you
best freind Google to learn it or wikipedia "
http://en.wikipedia.org/wiki/Regular_expression"
So in Npp, you can search and replace the regexp with "" i.e. nothing.
Good luck
2014-02-01 ron jan ronnew@users.sf.net:
I found the solution:
For me and the above string, I first use:
"2/.*[0-9A-Za-z ( )].htm", with Regalar Expression (sorry, if wrong since my Notepad is in Dutch)
which removes the filename and the 2/ and .htm, so "2/Name Of File.htm" from the above string.
then I just use the normal replace to remove all the rest.