[Interest] format of QString

André Somers andre at familiesomers.nl
Fri Apr 4 13:01:50 CEST 2014


sarah jones schreef op 4-4-2014 12:47:
> Hi
> How would you advise that I ensure a QString object is of a given format.
> In particular I want to check that a QString conforms to the following
> m_ or c_
> followed by 6 digits (0-9)
> followed by ".rcd"
>
> so m_000001.rcd matches as does c_000003.rcd
> but not m_aa00002.rcd
> etc
A regular expression sounds like the right tool for that. See 
QRegularExpression (Qt5) or QRegExp (Qt4).

André

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140404/3f34df65/attachment.html>


More information about the Interest mailing list