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?
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?
You want to replace for example "https://host.name/path/?getvar=3" with "URL host.name/path/?getvar=3" ??
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'
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
url's are surrounded with <a href= and end with a />
<a href=www.abc.com>ABC </a>
ASKER
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.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.