質問: Bash の文字列コマンドのような出力を返す PowerShell 正規表現パターンは何ですか?
gc と Select-String に関する記事を見つけました: Episode #137: Free-base64-ing。http://blog.commandlinekungfu.com/2011/03/episode-137-free-base64-ing.html
以前の質問「英数字とアンダースコアの正規表現」からいくつかの正規表現パターンを試しました。英数字とアンダースコアの正規表現
Bash で実行した場合: string --all myfile.bin 結果: 52939 行の文字列。
gc .\myfile.bin | Select-String -AllMatches "^[a-zA-Z0-9_]*$" 結果: 多数の空白行。
gc .\myfile.bin | Select-String -AllMatches "^\w*$" 結果: 9 行の文字と多数の空白行。
gc .\myfile.bin | Select-String -AllMatches "^\w*$" 結果: 9 行の文字。
gc .\myfile.bin | Select-String -AllMatches "[A-Za-z0-9_]" 結果: ファイル全体、印刷できない文字などすべて。
gc .\myfile.bin | Select-String -AllMatches "^[\p{L} \p{Nd}_]+$" 結果: 20 行の文字。
それで、私が見逃している正規表現のトリックは何ですか?