C setting string equal to substring

Viewed 1485

In C, If I have:

char *reg = "[R5]";

and I want

char *reg_alt = "R5" (equal to the same thing, but without the brackets), how do I do this?

I tried

*char reg_alt = reg[1:2];

but this doesn't work.

4 Answers
Related