regex expression to find 40 charecters string of digits or lower/upper case latter starting only with 6 or H

Mah 50 Reputation points
2023-05-13T06:32:02.1566667+00:00

Hi,

i use [A-Za-z0-9]{40} to find the string with all possible charecters. now how can i force the regex to find just those begining with either digit 6 Or letter H ?

Thanks.

Developer technologies .NET Other
Developer technologies VB
Microsoft Teams Microsoft Teams for business Other
Developer technologies C#
0 comments No comments
{count} votes

Accepted answer
  1. Viorel 122.6K Reputation points
    2023-05-13T06:41:02.0033333+00:00

    Try this expression: [6Hh][A-Za-z0-9]{39}.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.