In Javascript, I just need to append a i
to the regexp to make it case-insensitive. In .NET, I use a RegexOptions.IgnoreCase
.
I know about case-fold-search
. What I want is to specify that behavior in the regex itself, as specified in an elisp program. Possible?
To disable case-sensitive matching for regexp , use the 'ignorecase' option.
By default, the comparison of an input string with any literal characters in a regular expression pattern is case-sensitive, white space in a regular expression pattern is interpreted as literal white-space characters, and capturing groups in a regular expression are named implicitly as well as explicitly.
Regular Expression Search In GNU Emacs, you can search for the next match for a regexp either incrementally or not. Incremental search for a regexp is done by typing C-M-s ( isearch-forward-regexp ).
As someone said earlier, the way to control this is to bind case-fold-search
. There is no way to specify the regex's case-sensitivity (or lack thereof) in the regex itself.
As it happens, regexp matching is already case-insensitive by default.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With