2008-04-25, 09:44 PM
Hi I have a string that I'm trying to extract a value from. The html I'm stripping from is the following:
And here is the regex I've got that does work....
The value shows up as group 2. The problem with this is I want the regex in a config file, and at the moment, when i load the config file, it complains about the '<' inside the string.
What I'd like to do is look for "You have used" ignore the '<strong>' and extract the value.
Any regex wizards out there know how to do it??
Code:
You have used <strong> 13.02 GB</strong>
And here is the regex I've got that does work....
Code:
(You have used <strong> )(?'extract'[0-9]+.[0-9]+[ ]?[GB|MB]+)(</strong>)
The value shows up as group 2. The problem with this is I want the regex in a config file, and at the moment, when i load the config file, it complains about the '<' inside the string.
What I'd like to do is look for "You have used" ignore the '<strong>' and extract the value.
Any regex wizards out there know how to do it??