URL: https://www.overclockers.at/coding-stuff/ps-regex-replace_250737/page_1 - zur Vollversion wechseln!
hallo, ich bins mal wieder. und ich bin wieder zu deppat für alles
ich muss tausende files nach einem bestimmten string pattern durchsuchen und alle vorkommen verändert zurückschreiben. und ich steh beim replace grad an...
test für den betroffenen code ausschnitt:
Code: POWERSHELL$string = "blafasel/CCCA1234567890123456/foobar/HURRZ/CCVI6543210987654321/blubb" $replace = $string -replace '([C]{2})([A-Z]{2})(\d{4})(\d.*)(\d{4})/','$1$2$3XXXXXXXX$5/'
Code:blafasel/CCCA1234XXXXXXXX3456/foobar/HURRZ/CCVI8765XXXXXXXXXX4321/blubb
Code:blafasel/CCCA1234XXXXXXXX4321/blubb
overclockers.at v4.thecommunity
© all rights reserved by overclockers.at 2000-2025