A regular expression for finding HTML buttons, which captures the value attribute, content and any other attributes. You could use this in a replace function to change the type of the control to an input, whilst keeping most of its metadata and options.
[ a-zA-Z0-9_\-="]+
means "match any letter, number, space, hyphen, quote or underscore, one or more times". It roughly matches the allowed characters for HTML attributes and their values. If your attributes were more complex, including '&' or entities for example, you'd need to expand on this regex.
asdfbgh