I have a text file I need to extract 2 values from. The data I need is in the form
<tag var1="123.456" var2="987.456" />
The file has a lot of other junk I don't need. "<tag" is unique and only occurs once in the file. I need to assign these values to a couple PHP variables. The number of digits in each number might change. The names "var1" and "var2" will not change, but are not unique (other tags might use the same variable names).
What is the best way to do this in PHP? I tried regex, but I am not very good with regex.