Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. help me to understand my regular expression error AND solve it

help me to understand my regular expression error AND solve it

Scheduled Pinned Locked Moved C / C++ / MFC
regexhelp
1 Posts 1 Posters 7 Views 1 Watching
  • 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.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    since I am not allowed to post instructions ... the attached code correctly "matches " (highlighted )pair - BOTH items:

    QRegularExpression re("hci[0-9]+\t[0-9A-F:]+");

    in this text : Devices: hci1 00:15:83:15:A2:CB hci0 00:50:B6:80:4D:5D however this regular expression FAILS to match (highlighted ) "pair"

    QRegularExpression re("([0-F]{2}[:]){5}[0-F]{2}+solo");

    Scanning ... 00:50:B6:80:4D:5D nov251-desktop ED:C3:50:CA:6D:29 OontZ Angle solo D29 the difference is in sequence of matches (text address / address text ) and I just do not see my error. If I expand the text to full OontZ Angle solo D29 I get this ED:C3:50:CA:6D:29 A D29 Then my regular expression is plain wrong !

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups