Escape Sequences for Special Characters : Escape « Regular Expression « Perl






Escape Sequences for Special Characters

    

To include a backslash in a pattern, specify two backslashes: 
/\\+/ 

This pattern tests for one or more occurrences of \ in a string. 

   
    
    
    
  








Related examples in the same category

1.A word-count program that handles multiple spaces and tabs between words.
2.Escape sequences, \n and \t
3.Match the new line character
4.Match multiline patterns?
5.Skip blank lines and comments
6.Multiplies every integer in a file by 2