Details
-
Suggestion
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
Qt Creator 4.2.1
-
None
-
Windows 7x64
Description
Regular expressions are a powerful tool when finding or replacing code. However, the power and flexibility come at a price: Even simple expressions can be non-obvious to casual users. In addition, the documentation is so overwhelming that it's hard to find these simple expressions quickly.
Suggestion: Make it easier to use such simple expressions such as
-) match any character
-) match any number
-) match any string of characters
-) match any string of whitespaces
-) match a line break
Possible way to achieve this:
1) Add a little drop-down box in the find/replace dialog from which you can select and insert a few ready-to-use regular expressions and characters that need to be escaped
(see the Visual Studio 2015 Expression Builder for an example, although I would cut down to around 10 expressions for that)
2) Provide a shortlist of popular regular expression in the documentation
3) Provide a simplified regular expression option that only allows a few expressions, and that is modeled on well-known existing system (? to match single character, * to match any string, \n to match line break,...)
(see Notepad++ for an example)