Lebesgue measure question on carefully-defined subset of $[0,1]$ and showing that it is measurable In my self-study, I came across the following interesting little exercise: 
Let $A \subseteq [0,1]$ be the set of numbers $x$ between zero and one such that the digit 3 appears before the digit 2 in the decimal expansion of $x$. Prove that $A$ is measurable and find its Lebesgue measure directly. 
I am aware of a "sleight-of-hand" probability theory way for computing the Lebesgue measure of this set, and from there one might conclude that $A$ is measurable without being rigorous, but I am looking for a proof that proceeds by doing each of the following with sufficient rigor: verifying the measurable claim FIRST, and then evaluating the Lebesgue measure. 
 A: Here is a sketch of the measurability argument. 
For $0\leq x\leq 1$, define the $n$th decimal digit function by setting $d_n(x)$ to be the remainder after dividing $\lfloor 10^n x\rfloor$ by $10$. It is easy to check that $d_n:[0,1]\to\{0,1,\dots,9\}$ is Borel measurable. For any $k\in \{0,1,\dots,9\}$ define $T_k(x)=\inf(n\geq 1: d_n(x)=k)$ where we put $T_k(x)=\infty$ if the set is empty. This is also a Borel measurable function on $[0,1]$. Finally, we see that $A$ is a Borel set by 
$$A=\left\{ 0\leq x\leq 1: T_3(x)\leq T_2(x)\right\}.$$ 
You can also look at variations like 
$$A^\prime=\left\{ 0\leq x\leq 1: T_3(x)< T_2(x)\right\}$$ or 
$$A^{\prime\prime}=\left\{ 0\leq x\leq 1: T_3(x)< T_2(x)<\infty\right\}$$
if you insist that $x$ has a $3$ but not necessarily a $2$ in its decimal
expansion, or that it must have both. Neither of these variations changes the probability, by the way.   
A: First, you should specify which decimal expansion to take when there are two possibilities. For example. $.29999\ldots = .3$ will fail or meet your criterion depending on which expansion is taken. Second, you should notice that this actually doesn't matter since the collection of numbers with non-unique decimal expansion has measure zero (being countable) and Lebesgue measure is complete. Thus we might as well let $A$ be the set of numbers with unique decimal expansion in which a 3 appears before a 2.
Now we'll show that the set $A$ is in fact open (hence measurable): split $[0,1]$ into $10$ subintervals of equal length, so a number $x$ is in the $i$th interval ($0\leq i \leq 9$) iff the decimal expansion of $x$ has an $i$ in the tenths place (i.e. $x=.ix_{2}x_{3}\ldots$). Notice that the endpoints of these intervals all have non-unique decimal expansion, so we only care about them as open intervals. The $3$rd interval is a subset of $A$ whereas the $2$nd is disjoint from $A$. Split each of these remaining intervals (that is, all but the $3$rd and $2$nd) into 10 subintervals of equal length. The $3$rd of each of these is in $A$ whereas the $2$nd is disjoint from $A$. Continuing, we see that $A$ is a countable union of these "$3$rd" open intervals and hence is open.
The measure can also be computed from this construction. Since at each stage we add and remove things of equal measure (the "$3$rd" and "$2$nd" intervals, respectively), $\mu A = 1/2$ (where $\mu$ denotes Lebesgue measure).
