Verbatim
The Verbatim usage message is shown below.
  
 ![Verbatim[expr] represents expr in pattern matching,   requiring that expr be matched exactly as it appears, with no substitutions   for blanks or other transformations. More…](../HTMLFiles/Tricks_P-Z_638.gif) 
 
Verbatim[expr] is used when you want the pattern matcher to ignore the normal 
meaning of a pattern matching feature.  To demonstrate the next cell shows 
the FullForm of some patterns.
 ![FullForm[{x_, y_List}]](../HTMLFiles/Tricks_P-Z_639.gif) 
 ![List[Pattern[x, Blank[]], Pattern[y, Blank[List]]]](../HTMLFiles/Tricks_P-Z_640.gif) 
 
The attempt to delete all such patterns in the next cell fails because the 
pattern matcher treats the use of  "Pattern" here as a pattern matching 
construct instead of an actual form to search for.
 ![DeleteCases[{x_, y_List, 3, 4, 5}, Pattern[_, _Blank]]](../HTMLFiles/Tricks_P-Z_641.gif) 
  
 
In the next cell the pattern matcher knows to ignore the meaning of "Pattern
" so (x_) and (y_List) are deleted.  In this case only Pattern was wrapped 
in Verbatim so the pattern matcher did consider the meaning of (_) and 
(_Blank).
 ![DeleteCases[{x_, y_List, 3, 4, 5}, Verbatim[Pattern][_, _Blank]]](../HTMLFiles/Tricks_P-Z_643.gif) 
  
 
In the next example (Pattern[_,_Blank]) is wrapped in Verbatim so only that 
literal expression is deleted.
 ![data = {x_, y_List, 3, 4, 5, Pattern[_, _Blank], 6, 7} ;  DeleteCases[data, Verbatim[Pattern[_, _Blank]]]](../HTMLFiles/Tricks_P-Z_645.gif) 
  
Suppose you're given a list and want to get the element that matches the pattern (opt1→_). The attempt in the next cell doesn't work because use of a rule as the second argument in Cases has special meaning.
 ![Cases[{1 + x, opt1val, opt2val2, opt1}, opt1_]](../HTMLFiles/Tricks_P-Z_647.gif) 
  
 
In the next cell Verbatim makes Cases treat it's second argument as a form to 
search for instead of replacing (opt1) with (_).
 ![Cases[{1 + x, opt1val1, opt2val2, opt1}, Verbatim[Rule][opt1, _]  ]](../HTMLFiles/Tricks_P-Z_649.gif) 
  
Created by Mathematica (May 16, 2004)