10-07-2013 02:59 AM
Hi All
I am looking for a clever way to remove all url (s) from a given text.
That is, given a long text file with several URLs in it, how can I locate and remove them?
Regards,
Barddy
10-07-2013 03:07 AM - edited 10-07-2013 03:07 AM
Any URL will contain "http", so you can search for this word and then locate the space. So you can delete the phrase until you hit a space and then iterate similarly for all the other URLs. Does it make sense?
10-07-2013 09:27 AM - edited 10-07-2013 09:27 AM
You'll need to be mindful of the format that the URL is in. URLs can have spaces in them, but are then seen as %20 in the path that the browser resolves. If they all end in .com or .org you could use that to help find the end, and even more if this is some kind of html text you could look for the <a href=.......>blah</a> characters to find the start and end of the URL.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
10-07-2013 10:28 PM
Hi barddya,
it would be more better if you can attach your text from which you want to remove url, below i am attaching one vi, check it if it solves the problem.
10-07-2013 11:24 PM
Its really tough job because length of URL is not fixed. finding http is simple but delting it diffucult. what is the patten? Can you example any? Upload any string
10-07-2013 11:26 PM
Ritu,
Thank you for the attempt but did you even test this VI at all.
It ruins almost every word in th text
to test your VI, go to site such as this one . Note the URLs and see if you can fix your VI
http://thenextrecession.wordpress.com/
Regards,
Behzad
10-07-2013 11:36 PM
Hello barddya,
that's why i asked for your text string, becuase i was not having the text that'swhy just tested it with some sample your text pattern migth be different that's why it might not be working as expected and is it possible fro you to attach your data through text file because i am not able to open this site in my office
10-07-2013 11:57 PM
Remove text start from ( until ). Apart from this I didn't found any other common thing