[Qt-interest] Regular Expression Validating Username in QT

Raja Rokkam rokkamraja at gmail.com
Tue Jan 12 13:40:59 CET 2010


The reason for my regex is that the first character should be from the set:
a-zA-Z0-9 and remaining can be from the set a-z 0-9 -.@$

On Tue, Jan 12, 2010 at 6:09 PM, Raja Rokkam <rokkamraja at gmail.com> wrote:

> ^[a-zA-Z0-9][\.a-zA-Z0-9 at _$-]+
> or
>
> ^[a-zA-Z0-9][\\.a-zA-Z0-9 at _$-]+
>
> did not help as, it is still matching asdf.@* . I have tried escaping the
> dot in both the ways mentioned but to no avail.
>
>
> On Tue, Jan 12, 2010 at 5:53 PM, Ivan Kharin <korsar.akvis at gmail.com>wrote:
>
>> > Raja.
>> > Hi All,
>> >           I am trying to write a regexp validating an username which
>> contains  a-z 0-9 -.@$
>>
>> QRegExp usRx( "^[-_$@\.a-zA-Z0-9]+" );
>>
>>
>> --
>> Regards,
>> Ivan Kharin
>>
>> _______________________________________________
>> Qt-interest mailing list
>> Qt-interest at trolltech.com
>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100112/a5bfa97f/attachment.html 


More information about the Qt-interest-old mailing list