[Development] look-behind assertions in syntax HL?
Matthew Woehlke
mw_triad at users.sourceforge.net
Mon Feb 17 17:06:52 CET 2014
On 2014-02-16 12:02, Thiago Macieira wrote:
> Em dom 16 fev 2014, às 15:09:49, Giuseppe D'Angelo escreveu:
>> I guess that for Kate's purposes a small wrapper class around QRegExp
>> + QRegularExpression would suffice for supporting both syntaxes. For
>> the future, we could instead think of adding wildcard and fixed-string
>> pattern types to QRegularExpression.
>
> Fixed strings are supported already: QRegularExpression::escape.
Does this "know" already to do a simply string compare to test the
resulting regex? (And/or does compiling of the regex's already handle
that case for any regex that is effectively a fixed string?)
For me that has been the main reason to use a fixed-string pattern type.
> For wildcards, we should simply add another static that converts ? to . and *
> to .*. Do we want to support more interesting globbing things like []?
Are these supported mainly because the pattern may be coming from user
input, or because internally the match implementation can be more
efficient? If the latter, I'm not sure it is worth even having a "glob"
pattern type. If the former, then supporting as many shell-isms as
possible is probably useful.
--
Matthew
More information about the Development
mailing list