現在、.cpp ファイルから文字列を解析しており、_T 構文を使用して複数行の文字列ブロックを表示する方法が必要です。1 行の _T 文字列を除外するために、-notmatch ";" を含めました。それらを除外するパラメーター。これにより、必要な文字列ブロックの最後の行も除外されます。したがって、最後の文字列が「;」でブロックされるように、次の文字列を表示する必要があります。含まれています。
$foreach.moveNext() | を試してみました out-file C:/T_Strings.txt -追加しますが、うまくいきません。
どんな助けでも大歓迎です。:)
foreach ($line in $allLines)
{
$lineNumber++
if ($line -match "^([0-9\s\._\)\(]+$_=<>%#);" -or $line -like "*#*" -or $line -like "*\\*" -or $line -like "*//*" -or $line -like "*.dll* *.exe*")
{
continue
}
if ($line -notlike "*;*" -and $line -match "_T\(\""" ) # Multiple line strings
{
$line | out-file C:/T_Strings.txt -append
$foreach.moveNext() | out-file C:/T_Strings.txt -append
}