Home > Software engineering >  Reg Expression matching abcd['xcvjygj']
Reg Expression matching abcd['xcvjygj']

Time:06-23

abcd['xcv'] ==> match

abcd[0] ==> unmatch

123[0] ==> unmatch

123['tyu'] ==> unmatch

kjh['utyryfty'] ==> match

the format that should match: AlphaString['AlphaString'] (including single quotes and square brackets)

CodePudding user response:

Try this, it works for those 5 examples you posted

[a-z].*\[\'[a-z].*\'\]

  • Related