Quote:
Originally Posted by Agent Wesker
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
__________________