Hello together,
I got the following string:
<?xml version="1.0" encoding="UTF-8"?> <user> <user ritaID="METADIR"> <item desc="RASL Std. GPNR" name="testibus" value="562532525"/> </user> </user>
I ve done the following regex (i know there are easier approaches but I prefered to train some of the more advanced methods):
Why does this regex work properly?
$string -match '(?<!value=)((?<Number>\d+)(?="/>))'
result : 562532525
but this cuts me off the first part of the number? (value=", instead of value=)
$string -match '(?<!value=")((?<Number>\d+)(?="/>))'result: 62532525
I am just wondering why because it hasnt dawn on me .. :-)
thanks in advance!
Regards / Freundliche Grüsse King Julien