I’m trying to find about text and width value(so: 50%). To select 50% with regex I have to add width=" inside the regex. So, width="\d{2}% will select width="50% but I need to select only 50% in the first one.
In the second one, I have to select(find) only about text not <td>about.
<tr>
<td width="50%">about</td>
- Select the width value with percentage(search with “width” word but not select “width”).
- Select only “about” string
Well you will find out that using regular expressions to parse HTML is near impossible.
But the basic reg exps would be:
[EDIT]
Guessing by your comment below, you do not understand capture groups.