Suppose we are in math-mode and I want to use command \E with the following behaviour. If one or two primes follow the command, i.e. \E' or \E'', then I want to have in these cases certain expressions, say A or B. In all the other cases I want to have merely E independently what precedes or follows the \E. Here are exames
$any \E' some$-> any A some$any \E'' some$-> any B some$any \E some$-> any E some
I dont want to use the command in a longer form like \E{arg1}{arg2} but only in \E', \E'' forms. Let, for example,
\def\E#1#2{my code}
Then the problem arises when using something like
$$
x \E' \sin x
$$
Or
$$
A \E b
$$
Because "b" should not be considered as an argument of \E in the latter case and the same reason for a slash in front of sine in the former case.

$$..$$: http://tex.stackexchange.com/questions/503/why-is-preferable-to – Marco Daniel Nov 15 '13 at 15:06etoolboxandxparse– daleif Nov 15 '13 at 15:10