If possible I would like to replace the part of the URL tag after the @ sign, so from the example above are usernameABC and usernameXYZ to be replaced by the whatever value from the UPLOADER_ID tag.
I tried this: $regexp('https://www.tiktok.com/@usernameABC/video/1234567890','(.*)/@(.*)/video/.*',$1/@%UPLOADER_ID%/video/%UPLOADER_ID%)
naturally replace the complete URL string with the field name where you find that data.
I think the second example is not quite correct. It should be https://www.tiktok.com/@0987654321/video/0987654321
Or if I misunderstood that: $regexp('https://www.tiktok.com/@usernameABC/video/1234567890','(.*)/video/.*',$1/video/%UPLOADER_ID%)
I am still not sure what the source string looks like, which part is a variable one and how the target string should look like.
If it is simply to replace the string @usernameABC with %UPLOADER_ID% the try $replace(%fieldname%,@usernameABC,%uploader_id%)
I don't know in which field you put the URL that is why I set %fieldname% as dummy name.
The real username can be found in the HTML source, in AuthorID, which are saved in MKV (or MKA) as UPLOADER_ID, which are respectively:
6913995869449864197
242840465589526528
Therefore, I only want to replace,
@abcnews and
@enews
with their respective UPLOADER_ID values which are inside the MKV. So I would like them to become:
@6913995869449864197 and
@242840465589526528 respectively.
I would like this because the owners of any TikTok accounts can change their friendly nicknames (eg. @abcnews, @enews) anytime, so the URL will become dead if they did so.
Or no, let's try this:
Action of the type "Format value" for URL $regexp(%url%,'https://www.tiktok.com/@.*/video/(.*)','https://www.tiktok.com/'%uploader_id%'/video/$1')
I tested the resulting URL, copy-pasted it into the browser's address bar, and it redirected correctly to the friendly nickname URL counterpart (instead of 404). Now, no more "not found" accounts when the owners changed their friendly nicknames.