I can't believe C binary constant is non standard. Easy to solve with rich text.
Input (editable):
i = 42; i = 0x2a; i = 052; i = 101010;
Result:
i = 42; i = 0x2a; i = 052; i = 42;
Implementation: