This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Add "non-greedy" regular expression checkbox to Kate.

11

Votes
13
2
Tags: kate, regular, expression, greedy kate, regular, expression, greedy kate, regular, expression, greedy
(comma "," separated)
skynet
Registered Member
Posts
17
Karma
0
Non greedy regular expression like "\<.*?\>" not work in Qt4, but class QRegExp have method called setMinimal().
Code: Select all
QRegExp::setMinimal ( bool minimal )

This method tell QRegExp to use non-greedy "operators".
"\<.*?\>" still is not valid, but "\<.*\>" works like "\<.*?\>".

My idea is simple, just add "non-greedy" checkbox.
if checkbox is checked, RegExp.isMinimal() = true
if checkbox is not checked, RegExp.isMinimal() = false

mockup
Image


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot]