jviereck / regexp.js

A JavaScript implementation of RegExp for debugging purpose.
BSD 2-Clause "Simplified" License
51 stars 8 forks source link

Case-insensitive unicode matches? #1

Closed glyphobet closed 11 years ago

glyphobet commented 11 years ago

Does it support case-insensitive unicode matches? For example, in vanilla JavaScript, you can do this:

/ü/i.exec('ü')
["ü"]
/ü/i.exec('Ü')
["Ü"]
jviereck commented 11 years ago

There are tests for greek letters here:

https://github.com/jviereck/regexp.js/blob/master/test.js#L178

I've tested your characters on the console and they match :). Therefore, I am going to close this PR.

mathiasbynens commented 11 years ago

@jviereck Off-topic, but is there any reason you’re using String.fromCharCode? You could just use escape sequences.

E.g. String.fromCharCode(945)'\u03B1'.

glyphobet commented 11 years ago

Cool. Great presentation, by the way.

jviereck commented 11 years ago

You could just use escape sequences.

Just had not thought about using them - thanks for bringing this up :)

Closing this PR as the feature seems to be implemented.