I am trying to parse a webpage and to get the number reference after <li>YM#. For example I need to get 1234-234234 in a variable from the HTML that contains
<li>YM# 1234-234234 </li>
Many thanks for your help someone!
Rich
I am trying to parse a webpage and to get the number reference after <li>YM#. For example I need to get 1234-234234 in a variable from the HTML that contains <li>YM# 1234-234234 </li> Many thanks for your help someone! Rich
| |||||
feedback
|
currently, your regex only matches if there is a single number before the dash and a single number after it. This will let you get one or more numbers in each place instead:
Then, you also need to capture it, so we use a cgroup to captue it:
Then we need to refer to the capture group again, so we use the following code instead of the String.match
| ||||
feedback
|
| |||
feedback
|
Try this: | |||||
feedback
|