Regular expressions are case insensitive by default #11130
-
Defaulting to case-insensitive search for regular expression is surprising. I would expect regexp statements to be case sensitive unless explicitly opted-in. As an example, The documentation https://cs.github.com/about/syntax#regex is sparse to say the least. Is it using re2? What notation does it support? Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hey @maruel, thanks for the feedback. Right now regular expressions are case insensitive because our search index is case insensitive, which means that case sensitive search is somewhat inefficient. We're working on making case sensitivity possible, though. As for the regex engine, we're using this: https://docs.rs/regex/latest/regex/, so whatever that engine can parse we should be able to search. |
Beta Was this translation helpful? Give feedback.
-
this seems to work:
|
Beta Was this translation helpful? Give feedback.
Hey @maruel, thanks for the feedback. Right now regular expressions are case insensitive because our search index is case insensitive, which means that case sensitive search is somewhat inefficient. We're working on making case sensitivity possible, though.
As for the regex engine, we're using this: https://docs.rs/regex/latest/regex/, so whatever that engine can parse we should be able to search.