LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to search and remove one or more url from from a given text

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

0 Kudos
Message 1 of 8
(2,761 Views)

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?

-----

The best solution is the one you find it by yourself
0 Kudos
Message 2 of 8
(2,759 Views)

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.

0 Kudos
Message 3 of 8
(2,728 Views)

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. 

Download All
0 Kudos
Message 4 of 8
(2,712 Views)

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

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 5 of 8
(2,704 Views)

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

0 Kudos
Message 6 of 8
(2,703 Views)

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

0 Kudos
Message 7 of 8
(2,699 Views)

Remove text start from ( until ). Apart from this I didn't found any other common thing

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 8 of 8
(2,692 Views)