read file line as hashtable

hi all,

another noob question, please

I have a list of files I have to check if some value is present. Each line on these files are in a format like;
<p style=“padding-left: 40px;”>Name1=nameHere Value=</p>
<p style=“padding-left: 40px;”>Name2=nameHere Value=someValue</p>
Value could be either empty or not.

my question is: how can I read each line and place it in a hashtable, so then I can do if ($hash.Value -ne ‘’) …

thank you!

You could use a bit of regex parsing on each line, I suppose.

But it will depend a lot on the format of your file and how consistent it is.

it’s perfect.