You wouldn't really need to use replace, you just need to find the number and copy it into a new string.
mem's class does basically the same thing, but wraps it up in an easy-to-use library.
Here's another example, this one should be easier to understand.
Two things to remember when dealing with strings on arduino:
1) strings are basically just arrays of characters. I think PHP treats them a bit differently than regular arrays, but on arduino, they're just arrays, with the last element being '0' (to mark the end of the string)
2)pointers point to the beginnings of arrays, or a place in arrays.
1: char MyString = whateveryourstringis;
2: char string_to_find = "<data value=";
3: int length_of_find = strlen(string_to_find);
4: char * start_of_field = strstr(MyString,string_to_find);
5: char * start_of_data = start_of_field + length_of_find;
6: char CopiedData;
7: int index=0;
8: while(start_of_data[index] != ''')
10: CopiedData[index] = start_of_data[index];
13:CopiedData[index] = 0;
(lines 1-4) First, find where the data field is. We find the string "<data value='", and point to that position.
As an example:
(line 5) Then, we move a pointer over, to where the data actually starts
(line 6) We'll hold our copied data in CopiedData.
(lines 7-13)Then, we'll loop, and copy all that data to CopiedData.
(line 10) In every loop, we copy over a single character from the data to our CopiedData buffer,
(line 11) and then go to the next spot
when we've reached the end of the data (the other ' ), we stop copying,
(line 13) and put a 0 at the end of the copied data to mark the end
Hopefully, this example is a bit easier to understand.
Another thing to note, though: no matter how you get the data out of the string, you're going to have string data, not a number. So, if you actually have to use the number for something, you'll have to convert from that string to a number.