There is HTML as a string returned by Ajax call.
headings
....
<div class="wrapper">
<input type="text" name="email" value="" />
</div>
....
I'm retrieving the .wrapper and input element
var elements = $(MY_HTML_STRING);
var domName = $('input[name="name"]', elements);
then making updates with both of them, and, my question is how to put them back into MY_HTML_STRING for further sending with ajax to different recipient.
Please let me know if it will be better to do with regex.
UPDATE:
Updates are: input value updating + .wrapper class updates and writing a piece of data into global variable. Everything can be done with regex, but I like the jQuery smoothness of code. The question is technically: if it's possible in the way I suggested.