Timeline for answer to MatchQ[x y, (x | y) (x | y)] returns False by march
Current License: CC BY-SA 3.0
Post Revisions
4 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 13, 2016 at 21:07 | comment | added | march |
@rcollyer. Or MatchQ[#, a_ b_ | a_^2 /; And[Or[a == x, a == y], Or[b == x, b == y]]] &.
|
|
| Jun 13, 2016 at 21:06 | comment | added | rcollyer |
If the user wants to capture only x and y, a little work is required: MatchQ[#, a_ (b_ /; MatchQ[b, x | y]) | a_^2 /; MatchQ[a, x | y]] &.
|
|
| Jun 13, 2016 at 20:45 | history | edited | march | CC BY-SA 3.0 |
added 40 characters in body
|
| Jun 13, 2016 at 20:24 | history | answered | march | CC BY-SA 3.0 |