Delphi регулярное выражение

Discussion in 'С/С++, C#, Rust, Swift, Go, Java, Perl, Ruby' started by triblekill, 2 Mar 2018.

  1. triblekill

    triblekill Member

    Joined:
    21 Aug 2011
    Messages:
    351
    Likes Received:
    94
    Reputations:
    1
    Здравствуйте, подскажите как будет выглядеть регулярное выражение для парсинга например таких строк:
    HR8GN-3NRZY-M92F7
    MTD3Y-XBHNN-GMTGB-WCUPA
    VE9NHT-H6TT7M
    SRE4P-CTAET-M7AWC-EXAU4-UT3C6
    RWWFKWK3GW
     
  2. Redfern89

    Redfern89 New Member

    Joined:
    12 Jul 2012
    Messages:
    42
    Likes Received:
    1
    Reputations:
    -3
    Code:
    RWWFKWK3GW
    количество символов известно?

    для первого примера -
    Code:
    HR8GN-3NRZY-M92F7
    ([A-Z0-9]{5}\-[A-Z0-9]{5}\-[A-Z0-9]{5})
    
     
    triblekill likes this.
  3. triblekill

    triblekill Member

    Joined:
    21 Aug 2011
    Messages:
    351
    Likes Received:
    94
    Reputations:
    1
    Огромное человеческое спасибо !