Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Validating filename including predefined tags using QRegExp
Forum Updated to NodeBB v4.3 + New Features

Validating filename including predefined tags using QRegExp

Scheduled Pinned Locked Moved Unsolved General and Desktop
regexqregexp
1 Posts 1 Posters 676 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mammamia
    wrote on 22 Jul 2016, 11:27 last edited by Mammamia
    #1

    In my application I have line edit where user can enter a file name which will be used as the file name to save image while archiving with FTP.

    I have a combo box from which user can also select some predefined tags for the file name which is enclosed in . Eg:

    <TIME>
    <DATE>
    <HOUR>
    <YEAR>
    <COUNTER>
    <XXCOUNTER> -> This tag user can edit to replace XX with 00..09
    

    I want to allow user to manually enter these tags also. When user starts entering name the validation should be done and if found invalid then I will display the name in red color else in green color.

    Also I will not allow user to enter special characters which cannot be used in file name like |, /, ?, , ", :, *

    Example:
    Image_<COUNTER>     -     Valid
    Image_<COUNTER><    -     Invalid
    Name<12COUNTER>     -     Invalid
    

    How I can achieve validating the name which including the tags[<>] by using RegExpression[QRegExp]?

    1 Reply Last reply
    0

    1/1

    22 Jul 2016, 11:27

    • Login

    • Login or register to search.
    1 out of 1
    • First post
      1/1
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved