How to search partial text?
-
In QtCreator editor - is there a way to search for partial text ?
for example "test*" to get " test plus anything ". -
C Christian Ehrlicher moved this topic from General and Desktop on
-
In QtCreator editor - is there a way to search for partial text ?
for example "test*" to get " test plus anything ".Simply searching for 'test' will also find 'test plus anything'.
-
In QtCreator editor - is there a way to search for partial text ?
for example "test*" to get " test plus anything ".@AnneRanch by clicking on the icon in the search bar on the left hand side, you can enable regex search. Doesn't get more universal/powerful than that

-
In QtCreator editor - is there a way to search for partial text ?
for example "test*" to get " test plus anything ".@AnneRanch
It depends precisely what you mean by" test plus anything ".As @Christian-Ehrlicher said, if you really mean
testplus anything, including nothing (i.e. at end of line), you might as well just search fortestlike that, doesn't matter whether regular expression or not.If your
test*is supposed to be a regular expression, be aware that this does not search fortestnecessarily. It would search fortesfollowed by any number ofts, 0 or more. This pattern would be right if you are wanting to access a filename from a terminal/command prompt, but that is not a regular expression, as used in the Creator text editor or others.The equivalent as a regular expression would be
test.*. Note the "dot"/"period", meaning any character. But then you might just as well search for plaintest.If you wanted
testfollowed by something (i.e. not at end of line), that would betest.+. That is a "plus" instead of a "star".If you stipulate exactly what you want to match/not match there are other constructs in regular expressions which may do precisely what you want (e.g. you can search for just a "word" of
test, or start of a word, or a non-word, or others).