qregexp

How to replace QRegExp in a string?

强颜欢笑 提交于 2019-12-10 10:34:24
问题 I have a string. For example: QString myString = "Today is Tuesday"; The requirement is: when user types a string, if that string is contained in myString , then that part in the myString should be bold, and case insensitive ( Qt::CaseInsensitive ), but the format of myString should remain (upper case characters should be upper case and lower case characters should be lower case). For example: user types: tu -> Today is Tu esday user types: ES -> Today is Tu es day user types: aY -> Tod ay is

Qt/C++ regular expression library with unicode property support

十年热恋 提交于 2019-12-10 09:47:03
问题 I'm converting an application from the .Net framework to Qt using C++. The application makes extensive use of regular expression unicode properties, i.e. \p{L}, \p{M} , etc. I've just discovered that the QRegExp class lacks support for this among other things (lookbehinds, etc.) Can anyone recommend a C++ regular expression library that: Supports unicode properties Is unicode-aware in other respects (i.e. \w matches more than ASCII word characters) As a bonus, supports lookbehinds. Please don

Qt/C++ regular expression library with unicode property support

坚强是说给别人听的谎言 提交于 2019-12-05 22:34:18
I'm converting an application from the .Net framework to Qt using C++. The application makes extensive use of regular expression unicode properties , i.e. \p{L}, \p{M} , etc. I've just discovered that the QRegExp class lacks support for this among other things (lookbehinds, etc.) Can anyone recommend a C++ regular expression library that: Supports unicode properties Is unicode-aware in other respects (i.e. \w matches more than ASCII word characters) As a bonus, supports lookbehinds. Please don't point me to the wikipedia article; I don't trust it. That article says that QRegExp supports