View Single Post
Totenfluch
AlliedModders Donor
Join Date: Jan 2012
Location: Germany
Old 04-04-2017 , 15:18   Re: [ANY] Smart Link Remover
Reply With Quote #10

Quote:
Originally Posted by Agent Wesker View Post
Here is a slightly improved Regex from testing on our server:
((http:[/]{2}|https:[/]{2}|www[.])?[-a-zA-Z0-9]{2,}[.][a-zA-Z]{2,5})



I also modified your code to loop through each match in case of multiple links.
I have recoreded 73.000 player names and none of them had http in their name. So you can scrap that~
the MAX_NAME_LENGTH makes it literally impossible to have two links in a name that's why I didn't implement it
Other than that your regex looks extremly solid with 0 false positives and all matches in my ~350 name test - Well done!
If you send me a pull requests I'll merge it


we're having a discussion here:

https://github.com/Totenfluch/SmartLinkRemover/pull/1

if you want to join
__________________
Notable Projects:
Event Item Spawner | Scissors, Rock, Paper for ZephStore
tVip | Smart Link Remover
PLG & GGC - CS:GO Roleplay

and countless more...

I can make a helicopter shoot missles if you want me to...

Last edited by Totenfluch; 04-04-2017 at 15:22.
Totenfluch is offline