samedi 30 novembre 2019

Understanding and adding to if statement

I parse a text (HTML) file for the first GCcode. I have this if sentence that works:

$wp = if($html | %{$x -match '\b((GC)[A-Z0-9]+)'}){$matches[1]}

The problem is that some time the first value that matches is "gcCode" which is not a valid value. How do I make it search on if the result is "gcCode"

Aucun commentaire:

Enregistrer un commentaire