T
TJoker .NET
Hi all.
I have this database table (inherited from an legacy application) that
contains some information that I want to extract.
Basically, in one of the tables, there's a column containing a description
that starts with a NUMBER, but can be preceeded by some raw html elements.
Examples:
ex1:
<p>12 this is the first item ....
ex2:
<p>12. this is the first item ....
ex3:
<span id="my id" style="width:3" ><p>12. this is the first item ....
ex4:
12. this is the first item ....
I'm trying to extract the Number ("12" in all above examples)
The closest I got was when I tried the following regular expression pattern
:
string pattern = @"(<\w*>)*(?<digit>(\d+)).+";
It didn't match put the number in the right match group (= digit). I'm
still new to Regex.
Has anybody came accross any similar situation ?
thnks a bunch
TJ !
I have this database table (inherited from an legacy application) that
contains some information that I want to extract.
Basically, in one of the tables, there's a column containing a description
that starts with a NUMBER, but can be preceeded by some raw html elements.
Examples:
ex1:
<p>12 this is the first item ....
ex2:
<p>12. this is the first item ....
ex3:
<span id="my id" style="width:3" ><p>12. this is the first item ....
ex4:
12. this is the first item ....
I'm trying to extract the Number ("12" in all above examples)
The closest I got was when I tried the following regular expression pattern
:
string pattern = @"(<\w*>)*(?<digit>(\d+)).+";
It didn't match put the number in the right match group (= digit). I'm
still new to Regex.
Has anybody came accross any similar situation ?
thnks a bunch
TJ !