Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Ruby now allows (some) Unicode glyphs as names (allowing for things like Δv).

    08:11:32 >> Δv = 3
    => 3
    08:11:39 >> p Δv
    3
    => 3
My solution when I have problems like this is to start building a negative regexp in vim:

  /[^-a-zA-Z0-9 \[\]]
I then add other symbols as I find them. I can usually find the illegal characters in about 30 seconds this way—and I can add the non-ASCII glyphs that I expect to be present to my regexp.


JavaScript allows a wide range of Unicode characters - http://stackoverflow.com/a/9337047




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: