XF 1.5 Regex for title to url

Robert9

Well-known member
I have to show some links to the forum while i only knew the title and id of a thread;
i substitute " " with "-";
what else i have to regex, please?

What is the name of the function that makes our lunbks to threads?
I have to do this in perl, so i cant use the function itself, but i would like to know what i have to substitute.
May someone help me out, please?
 
I have translated it in a first step to:

Perl:
$title =~ s/^\s+|\s+$//g;
$title =~ s/\s+/-/g;
$title =~ tr/`!"'$%^&*()-+={}[]<>;:@#~,.\/?|//; 
$title =~ tr/\r\n\t\\//; 
$title =~ tr/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/;
 
Top Bottom