Filter string in C

Posted by Paul Tarjan on Stack Overflow See other posts from Stack Overflow or by Paul Tarjan
Published on 2010-03-11T05:28:00Z Indexed on 2010/03/11 5:33 UTC
Read the original article Hit count: 290

Filed under:
|
|
|

How can I filter a string in c? I want to remove anything that isn't [a-z0-9_].

int main(int argc, char ** argv) {
   char* name = argv[1];
   // remove anything that isn't [a-z0-9_]

   printf("%s", name);
}

© Stack Overflow or respective owner

Related posts about c

    Related posts about regex