Regex is not my strong suite but I am currently using this regex (\/[\d]+) to get the id from tictok urls.
https://m.tiktok.com/h5/share/usr/6641141594707361797.html
https://m.tiktok.com/v/6749869095467945218.html
https://www.tiktok.com/embed/6567659045795758085
https://www.tiktok.com/share/user/6567659045795758085
https://www.tiktok.com/trending?shareId=6744531482393545985
I get the id from all the links except the one with the shareId=xxxxxxxxxxx. I modified my original regex to the following below and still not getting the id from the link with shareId=xxxxxxxxxxx. Any help will be greatly appreciated.
(?:|shareId=)(\/[\d]+)