How can I find a specific value from HTML tags using Regx?

I have one html file and I have read it in a text format and now I have to find src value before specific order id, and this order id will be unique.
Please refer the below image,

Yellow highlighted value is unique order id.
Red highlighted value I have to get using Regx.
I want to extract both src value.

you can refer this text file for example.
Html Text.txt (2.1 KB)

Please help me to find the Regx exp.

we would recommend processing HTML with HTML related approaches like

Depending on the use case, native extractions may also be utilized and tuned

When mandatory RegEx should be used, then we would recommend on more specifying anchor patterns as only a \d+ would not catch only the order ids

what is this :slight_smile: it’s not working.

Try to pass variable for the yellow highlighted value and you first manipulate string by the src values first appears and that you can have script or assign activity line where you store the value.
Regex will be difficult to extract this
Try string
Manipulation methods

I also was thinking for the same but can you give me String manipulate for the same?

does need that you share with us what was done by you in detail and what is the output / failing result

I just found the Regx solution and it’s working.

System.Text.RegularExpressions.Regex.Matches(Text, “(?<=3585975.*?src=')(s_s_ledg.gif)|(s_s_ledgr.gif)(?=.*3559722)”).Cast(Of System.Text.RegularExpressions.Match)().Select(Function(m) m.Value).ToArray()

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.