The dot metacharacter and the zero or more quantifier : Metacharacters « Regular Expression « Perl






The dot metacharacter and the zero or more quantifier

    

while(<DATA>){
    print if s/[A-Z].*y/Tom/;
}
__DATA__
    Mary 101
    Tom 201

   
    
    
    
  








Related examples in the same category

1.Meta-Character ASCII Values
2.Meta-Characters listing
3.Metacharacters and metasymbols
4.Metacharacters for Single Characters
5.Metacharacters that Turn off Greediness
6..* special-character combination tries to match as much as possible
7.The dot metacharacter
8.Some Regular Expression Metacharacters