Can we support case-insensitive?
sohaha opened this issue · 5 comments
sohaha commented
Can we support case-insensitive?
quasilyte commented
Hello. Could you provide some pattern examples and what they're supposed to match with the case-insensitive mode?
sohaha commented
<?php
class a
{
public static function js()
{
}
}
a::js();
a::Js();
a::JS();
// they should be the same
phpgrep test.php 'a::js()'
# test.php:9: a::js()
quasilyte commented
Interesting! This sounds useful.
quasilyte commented
You can try building the phpgrep from master branch.
It will do a case insensitive matching by the default as I think it's a more common case when you want f()
to match both f()
and F()
. If case sensitive matching is required, it can be enabled with -case-sensitive
flag.
sohaha commented
perfect 👍