Hi,
I have problem with capturing info from below input which is when the input have a “-” symbol it can captured but when there is no “-” regex cant get the value
(Plot 526 Plot 549) = 24 units Block 16 (Plot 707 - Plot 762) = 56 units
(Plot 526 - Plot 549) = 24 units Block 16 (Plot 707 - Plot 762) = 56 units
expected captured value is
a=526
b=549
c=24
d=Block 16
e=707
f=762
g=56
by regex command above I only manage to get the output if there is “-” format for (Plot 526 - Plot 549) but if the input no “-” symbol => (Plot 526 Plot 549) I can’t get the value
mc = System.Text.RegularExpressions.Regex.Matches(strText,"Plot\s*(?<FIRSTVALUE>\d+)\s*Plot\s*(?<SECONDVALUE>\d+)\D+(?<THIRDVALUE>\d+).*?Block\s*(?<FORTHVALUE>\d+).*?Plot\s*(?<FIFTHVALUE>\d+).*?Plot\s*(?<SIXTHVALUE>\d+).*?(?<SEVENTHVALUE>\d+)")