The bracketed character class : Character Class « Regular Expression « Perl






The bracketed character class

    
while(<DATA>){
   print if /[A-Za-z0-9_]/;
}
__DATA__
    Tom 101
    Jack 201
    Nart 301

   
    
    
    
  








Related examples in the same category

1.Character Class: Alternative Characters
2.Character Class: Anchored Characters
3.Character Class: Miscellaneous Characters
4.Character Class: Remembered Characters
5.Character Class: Repeated Characters
6.Character Class: Whitespace Characters
7.Match any number of alphanumerics followed by a single space character
8.Match at least one alphanumeric followed by a single space character
9.Posix and Unicode Classes
10.The bracket metacharacters and negation