Post

My girlfriend plays a game that blocks you from naming characters inappropriately, but for some reason it blocks a ton of normal names like "Valerie" or "Fiona" or "Hailey" or "Squidward" or "Sean" so she asked me to look at the game's code to find out whyโ€ฆ ๐Ÿงต

The issue is that the RegEx tries to use the | symbol, except that's exactly the same symbol that the game already uses to break apart the whole list of filters! This means the 1 RegEx filter actually becomes 3: "L(A", "E", and "U)X"โ€ฆ This 2nd filter then blocks any name with an "E" in it! ๐Ÿ’€

Bonus fact: the game doesn't even support RegEx here! Instead it uses an algorithm where it iterates over every possible subsection of the name to see if it matches a banned term which is highly inefficient!

0 reposts9 likes