Hi,
I have the following string:
<INPUT TYPE="text" SIZE=40 NAME="user" VALUE="john"> <br>
i would like to extract the VALUE so in this case "john", and then replace it with something else. Can regular expressions be used in C?
Thanks
This is a discussion on Find specific text. within the C Programming forums, part of the General Programming Boards category; Hi, I have the following string: <INPUT TYPE="text" SIZE=40 NAME="user" VALUE="john"> <br> i would like to extract the VALUE so ...
Hi,
I have the following string:
<INPUT TYPE="text" SIZE=40 NAME="user" VALUE="john"> <br>
i would like to extract the VALUE so in this case "john", and then replace it with something else. Can regular expressions be used in C?
Thanks
In times of war, shoot!
Is it possible? Sure. Is it the easiest thing? No.
Searching and finding is easy. Try strchr (I think).
To replace "john" with something else, you may have to move data back of forth first (memmove), and then copy the appropriate string into place (strcpy).
For information on how to enable C++11 on your compiler, look here.
よく聞くがいい!私は天才だからね! ^_^
There are regular expression libraries that you can use in C. Search the web (e.g. sourceforge).
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.