Regex Expression:^[a-zA-Z0-9-]*$

Hi,

Can you please explain this Regex expression meaning which is in isMatch activity
Regex Expression:[1]*$

Thanks
Likitha


  1. a-zA-Z0-9- ↩︎

Hi @vinjam_likitha

This takes anything from start of the line to end of the line if it is Alphanumeric (alphabet or numbers).

^ - Indicates start of the line.
$ - End of the line.
a-zA-Z - Alphabets irrespective of the case.
0-9 - Numbers

2 Likes

Hi,

This will match the string which consist of only hyphen or alphanumeric characters including empty string.

Regards,

Hi @vinjam_likitha

The regular expression ^[a-zA-Z0-9-]*$ matches any string that contains only letters (uppercase or lowercase), digits or hyphens.

  • The ^ and $ characters are anchors that match the start and end of a line respectively.
  • The * character matches zero or more occurrences of the preceding character.
  • The square brackets [a-zA-Z0-9-] define a character set that matches any uppercase letter, lowercase letter, digit or hyphen.

Hope it will help you

Regards
Gokul

Thank you all @Harshith_Adyanthaya @Gokul001 @Yoichi

for explaining this

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.