DOCUMENTATION CENTER SEARCH
Mathematica
>
Built-in
Mathematica
Symbol
Introduction to Patterns
String Patterns
Tutorials »
|
BlankSequence
BlankNullSequence
Pattern
Optional
ForAll
StringExpression
Slot
See Also »
|
Language Overview
Patterns
Rules & Patterns
String Patterns
Mathematica Syntax
More About »
Blank
(_)
_
or
Blank
[]
is a pattern object that can stand for any
Mathematica
expression.
_
h
or
Blank
[
h
]
can stand for any expression with head
h
.
MORE INFORMATION
The head
h
in
_
h
cannot itself contain pattern objects.
EXAMPLES
CLOSE ALL
Basic Examples
(2)
A pattern that matches any expression:
In[1]:=
Out[1]=
A pattern that matches any symbol:
In[2]:=
Out[2]=
A function definition that will take any single argument:
In[1]:=
In[2]:=
Out[2]=
A function definition for integer arguments only:
In[3]:=
In[4]:=
Out[4]=
SEE ALSO
BlankSequence
BlankNullSequence
Pattern
Optional
ForAll
StringExpression
Slot
TUTORIALS
Introduction to Patterns
String Patterns
MORE ABOUT
Language Overview
Patterns
Rules & Patterns
String Patterns
Mathematica Syntax
New in 1
© 2008 Wolfram Research, Inc.