5 ms·
You're misreading the regex. \u200c is a single whitespace character. http://www.fileformat.info/info/unicode/char/200c/index.htm http://www.fileformat.info/inf
by solipsism 10y ago
You're misreading the regex. \u200c is a single whitespace character. http://www.fileformat.info/info/unicode/char/200c/index.htm http://www.fileformat.info/info/unicode/char/200c/index.htm
- dingo_bat 10y agoBut that's a weird character to put in a comment line! I don't get how this would happen accidentally.
- pyre 10y agoYou really can't think this way when accepting input from users.
- Piskvorrr 10y agoRunaway automatic search-and-replace? There's no way to distinguish intent.
- dingo_bat 10y agoRunaway search and replace won't put a single 200 width whitespace character AFAICT
- Piskvorrr 10y agoThat's the meaning of "runaway" - Notepad++ had a search&replace that went into a somewhat random, long and uninterruptible loop if you were replacing using some types of regex and searhing forward in the file - you had to search backwards.
- brokenmachine 10y agoWhat difference does it make if it got in there accidentally or on purpose? Stackoverflow is a programmers site, you must expect that a programmmer might go, "Hmm, they're trimming whitespace, wonder what happens if I put 20,000 unicode whitespace characters in there instead of normal whitespace"?