You are here: PSPad forum > English discussion forum > Extract all links / URLs?
Posted by: Dirk | Date: 2014-02-21 22:52 | IP: IP Logged
Thank you very much vbr.
Quote:This would be possible, however, in multiple steps - the simplest way I can see would be, to replace
www\.
with:
www.first, and then remove the possibly duplicated part be replacing:
(https?://)http://with
$1
Very sorry, cannot understand how to handle these lines.
Quote:this would be easier, it just seemed that you can also have URLs without this part. You may try:
www(\.[\w]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?
Thank you for the new one. Yes, that seems to work well, some URLs do not make it, but the most ones are alright, I would say.
OK, well, I will try it with those regexes. Thank you very much for your nice help.
Posted by: vbr | Date: 2014-02-22 00:19 | IP: IP Logged
Dirk:Thank you very much vbr.Quote:This would be possible, however, in multiple steps - the simplest way I can see would be, to replace
www\.
with:
www.first, and then remove the possibly duplicated part be replacing:
(https?://)http://with
$1Very sorry, cannot understand how to handle these lines.
Quote:this would be easier, it just seemed that you can also have URLs without this part. You may try:
www(\.[\w]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?Thank you for the new one. Yes, that seems to work well, some URLs do not make it, but the most ones are alright, I would say.
OK, well, I will try it with those regexes. Thank you very much for your nice help.
I'm glad, it helped a bit;
sorry for the omission in the replacement recipe, which indeed doesn't make sense in this form. I meant a regular expression replacement of
www\.
with:
www.
and then:
(https?://)http://
with
$1
before the builtin pattern in PSPad can be used.
regards,
vbr
Posted by: Dirk | Date: 2014-02-22 09:29 | IP: IP Logged
Thank you vbr.
Quote:www\.
with:
www.and then:
(https?://)http://
with
$1
Sorry for my bad understanding, I guess that might be right:
So in the window "Replace" add
www\.
to "Find" and
www.
to "Replace" and check "Regular Expressions", I assume
then execute, after add
(https?://)http://
to "Find" and
www.
to "Replace" and check "Regular Expressions" and the last step then using that PSPad regex. That it is.
By the way, how can one stop a running replacement or an URL extraction without using the Task Manager?
Many thanks again.
Ah, have I missed that: wouldn't it be much more easier to first use the built in regex, then with the built in regex a second time, now use it with "Find & Replace" to delete the same links you just copied in the first step and then use a simple regex to add "http", "https" to the remaining "www." and in the last step use the built in regex again to now copy the new http links?
Edited 2 time(s). Last edit at 2014-02-22 09:51 by Dirk.
Posted by: vbr | Date: 2014-02-22 09:56 | IP: IP Logged
Dirk:Thank you vbr.Quote:www\.
with:
www.and then:
(https?://)http://
with
$1Sorry for my bad understanding, I guess that might be right:
So in the window "Replace" add
www\.
to "Find" and
www.
to "Replace" and check "Regular Expressions", I assume
then execute, after add
(https?://)http://
to "Find" and
www.
to "Replace" and check "Regular Expressions" and the last step then using that PSPad regex. That it is.By the way, how can one stop a running replacement or an URL extraction without using the Task Manager?
Many thanks again.
Hi,
I'm guessing, the "h t t p : / / " part of the pattern is somehow being swallowed by the forum software.
the first step is to replace using regex:
www\.
to
h t t p : / / www.
[without spaces]
I guess, you can't stop the replacement while running (other than the mentioned "hard way"), you can check the option in the replace dialog to confirm each match.
hth,
vbr
Posted by: Dirk | Date: 2014-02-22 11:16 | IP: IP Logged
Hi.
OK, thank you very much for helping.
Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR