Crop text script

August 5th, 2016

friends,
can you please advise/write me a script which can copy certain text after a word e.g.
here are the results from google search with string
site:~ Dead file host ~/files
#
RapidShare: Easy Filehosting
Other payment options. Our reseller network is growing, so we can offer alternative payment options in an increasing number of countries. ...
~ Dead file host ~/files/156285922/HDL - 18k - Cached - Similar pages
#
RapidShare: Easy Filehosting
Other payment options. Our reseller network is growing, so we can offer alternative payment options in an increasing number of countries. ...
~ Dead file host ~/files/116538879/_1605 - 18k - Cached - Similar pages
#
RapidShare: Easy Filehosting
Other payment options. Our reseller network is growing, so we can offer alternative payment options in an increasing number of countries. ...
~ Dead file host ~/files/72132339/bbupdater - 18k - Cached - Similar pages

I want that the script should copy the text after ‘files/’
and before ‘/’
Thanks for your help in advance
Yanny

Answer #1
I do that with ultaedit32 macros
you can do a search fore file, move ahead 1, hold select and search for the next instance or search and hile/delete to remove what you don’t want
Answer #2
thanks ED,
I’ll take a look. Can I be able to do it even if I never used macros?
Answer #3
you should
these’s a macro menu with a quick record option to test till you find what works
Answer #4
Hi Ed,
I have insyalled it. But can’t figure-out how to do this. can u pls. help?
Answer #5
‘k

this is what you have ~ Dead file host ~/files/72132339/bbupdater - 18k - Cached - Similar pages
and this is what you want
72132339

you want to end up with just the numbers ?
hit record macro
if you want to remove text from file/ (or any term) and back search the term, it will be hilited
go one arrow right then 1 arrow left (to dehilite) then hold shift key and select backwards using arrow keys (4 up I think) and delete
watch for line breaks as to whether you want to include them of not, to prevent blank lines or retain individual lines
will also work going forward but no need for the remove hiliting step, you can just hold shift key and arrow forward, or if just removing the remaining text on the line hit the end key instead of arrowing
so after the delete backward operation just search “/” when recording the macro be sure to start at the beginning of the line before selecting record macro
if every entry has the EXACT same text to be removed you can do a find and replace to remove said text before doing the find and replace operation fiddle a little and see what you get
usually takes me a few tries to get it right, so save in steps but don’t overrite the org !
if it’s just the one file you need done upload it and I’ll see what I can do

 

| Sitemap |