Link to home
Start Free TrialLog in
Avatar of Yogesh Bansal
Yogesh Bansal

asked on

replacing hypertext links with simple text 'URL'

I had this question after viewing How to remove unicode characters from csv file?.

In the context of best accepted solution i.e for the same dataset, how to replace the https i.e (hypertext) links with 'URL' in the whole document?
Avatar of gelonida
gelonida
Flag of France image

You want to replace for example  "https://host.name/path/?getvar=3" with  "URL host.name/path/?getvar=3" ??
Avatar of Yogesh Bansal
Yogesh Bansal

ASKER

Hi,

No, I want to replace all hypertext links i..e http://t.co/fej2v3OUBR by 'any word'. I want to clean up my document by replacing all https with simple text  let's say 'any word'
ASKER CERTIFIED SOLUTION
Avatar of gelonida
gelonida
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi,

There is an error coming which I have attached below.
error.png
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi,

The link http://www.google.com/w=sdfsdfsdfsdf  is replaced by <Link>w=sdfsdfsdfsdf

I want the complete url to be replaced by <Link>
error.png
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
url's are surrounded with <a href=  and end with a />
<a href=www.abc.com>ABC </a> 

Open in new window

Hi,

The code works. It removes url with get params but I am getting empty output.txt.
I was wondering if it is possible to make changes in the original file instead of generating new file with all params removed.

Many Thanks.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial