I can basically understand condition expectation with the condition being an event or a random variable($E(X|Y=y)$). However, I have a hard time understanding the condition being a range, especially with the variable itself or another random variable involved.
For example, $E(X|a<X<b)$, $E(X|Y>0)$, or $E(X|X>Y+a)$. What are the intution and formula behind?
I can roughly understand $E(X|a<X<b)$. We need to focus the value of $X$ between $a$ and $b$, so $\int_{a}^{b} xf(x)dx$. And because $(a,b)$ is just a subset of $X$, we need to scale $\int_{a}^{b} xf(x)dx$ by the probability of $X$ being in the range, so $E(X|a<X<b)=\int_{a}^{b} xf(x)dx/\int_{a}^{b} xdx$. Are the formula and understanding correct?
How about the other two?
All three of your examples are of the form $E[X|A]$, where $A$ is an event with a nonzero probability. This is computed as $$ E[X|A]=\frac{E[X\cdot {\bf 1}_A]}{P(A)} $$ where $\def\1{{\bf 1}}\1_A$ is the indicator random variable for the event $A$.
The intuition is this: taking expected value is just integration. Taking conditional expected value is just a restricted integral over where you are conditioning on, and then dividing by a normalizing constant. Just like the expected value of a deterministic number is just itself, $E[3]=3$, you would hope the conditional expected value of a deterministic number to have the same property. Dividing by $P(A)$ in the above equation ensures this is so.
In order to compute $E[X\cdot {\bf 1}_A]$, you integrate $xf(x)$ only over the region $A$. When the event you are conditioning on involves another random variable $Y$, then the event is the region in the plane, and you must do a double integral over this region: $\iint_A xf(x,y)\,dx\,dy.$ On the other hand, $P(A)$ is found by just integrating the (joint) pdf over the region $A$.
For $E[X|a<X<b]$, you have erred in the denominator: $$ E[X|a<X<b]=\frac{\int_a^b xf(x)\,dx}{\int_a^b\;\, f(x)\,dx} $$ For your other two examples: $$ E[X|Y>0]= \frac {\int_0^\infty \int_{-\infty}^{\infty}xf(x,y)\,dx\,dy} {\int_0^\infty \int_{-\infty}^{\infty}\;\,f(x,y)\,dx\,dy} $$ $$ E[X|X>Y+a]= \frac {\int_{-\infty}^\infty \int_{y+a}^{\infty}xf(x,y)\,dx\,dy} {\int_{-\infty}^\infty\int_{y+a}^{\infty}\;\,f(x,y)\,dx\,dy} $$