Moar Regex Does Not Respect Square Brackets & Other Ways To Make A Search Case Sensitive
I noticed this when I was going through the curl manpage. In it there's the "-f" and the "-F" flag so it would be nice to be able to search for just the "-f" flag.
Since moar supports regex I thought I could use square brackets but moar doesn't respect it and continues using smart casing. Example:
^\s*-[f]
With this I would search lines that do or do not have whitespace and should be giving me specifically "-f" and not "-F" since [a-z] is case sensitive. But like I said the regex engine of moar either doesn't recognize using square brackets or moar just overrides it with smart casing. Either way it's not the desired behavior.
Square bracket regular expressions should be respected by moar.
Another way to do it would be the Vim or Emacs Evil Mode way where you use a backspace character. For example:
-f\C
The "\C" makes the search case sensitive and while "\c" makes it case insensitive it's probably not necessary since moar uses smart casing by default. I think I've seen at least one program use "\U" and "\u" instead but I can't remember.
UPDATE:
After researching how Golang does regex I figured out I could use (?-i) to disable the case insensitivity. At least something works but it would be nice to have the other options. At least to respect square brackets.
I vote for this request please add support
Vote Up for the request