Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with Search options user 36

Questions on expression testing and manipulation through pattern matching and constructing efficient patterns.

10
votes
How about this: Cases[eqn, Derivative[orders__] -> {orders}, Infinity, Heads -> True] (* Out: {{0, 1}, {2, 0}} *) Now, you've got the orders of each derivative returned in a list that you can mani …
answered Feb 3 '13 by Mark McClure
9
votes
I think that the following catches all color heads. Clear[test]; test[x : (_CMYKColor | _Hue | _RGBColor)] := "good" test[else_] := "bad" Let's try it test[Red] (* Out: "good" *) test[red] (* Out …
answered Nov 30 '12 by Mark McClure
12
votes
A key issue, I think, is that PatternTest must evaluate its argument to work, even if function holds its arguments. Thus, there can be a huge difference in the timing between the two. Here's an exam …
answered Aug 12 '12 by Mark McClure
31
votes
I recommend that you import as an XMLObject, which represents structured XML data in a Mathematica-based format. info = Import[ "http://area51.stackexchange.com/proposals/4470/martial-arts", …
answered Mar 23 '12 by Mark McClure