Closed wsrvn closed 2 years ago
by adding |\$[^\$]{1}
as the last OR, we change the output into
ωαғα | Nexogg GF
мσтιи|ғ
heythere
[CMC]GuessWho
Uber Bug
TM DES
|ǵƒ.sabøPazeh
thefunnyname
dollar$lar
which is a significant improvement. the only thing left now is.. matching the double dollar and i have no clue how.
in xaseco, this is done by replacing it with null \0
before regex, and placing it back in the last operation. guess we could do that as well.
while our solution works just fine for the majority of the cases, there still appear to be a few outliers that manage to break the matching. note that the algorithm may be unoptimised too, so thats a thing to look out for as well.
for reference, heres the (fully commented) presumably working version of the function, courtesy of xymph (WARNING PHP):
ignoring the comments and """fancy""" format (aka i love wasting space in my editor):
forTM can obviously be ignored. it is unused even in xaseco itself XD.
NOTE that the function above does not remove the other formatting codes, for that
\$[SHWIPLONGTZ]\
should be used (usually as the last OR statement)here's a list of entries that should be tested against the regex to ensure its working (use regexr or something similar, dont overcomplicate your life lol):
expected output:
current output: