What is correct javascript code for extract line id url?

i copy javascript code from internet for test extract url from any source code.
this is some code for extract url ( it can extract line id url too)

if (address_type == "web") {
rawemail = input.match(/([A-Za-z]+:\/\/[A-Za-z0-9-_]+\.[A-Za-z0-9-_%&\?\~/.=]+)/gi);
} else {

when source code was extracted it will show result in this:

example

https://www.ddd.com/search
https://www.aaa.com/finance
https://line.me/ti/p/~aaa.bbb207/12

BUT word /12 not line id i confirm i don’t want it.

what is correct Regular Expressions for extract line id url to this format …
https://line.me/ti/p/~aaa.bbb207 only !

Hi @helpmee, what is the exact criterion for not including /12 in the path of the URL? That it’s a number?

yes sir . it is puzzle number that some webmaster write in for some purpose i think so !
i want to cut out .

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.