HIRO posted on 8月 21, 2008 22:37

この記事は以前 http://blog.hiros-dot.net/ に書いたものです。

置換演算子は、指定した値で元の値の一部または全体を置き換えることができます。置換演算子は下記に示すように3つあります。

演算子 説明
-replace 半角英字の大文字/小文字を区別しないで置換する。
-ireplace 半角英字の大文字/小文字を区別しないで置換する。
-creplace 半角英字の大文字/小文字を区別して置換する。

置換演算子は下記のようにして使用します

"置換対象文字列" -replace "置換したい文字(列)", "置換後の文字(列)"

下記は"Hiro"という文字列を"Hero"へ置換します

PS C:\Work> "Hiro" -replace "i","e"

Posted in: PowerShell , PowerShell入門  Tags:

最新のブログ

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

コメントを書く


 

  Country flag

biuquote
  • コメント
  • プレビュー
Loading



Calendar

«  11月 2008  »
月曜火曜水曜木曜金曜土曜日曜
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567
View posts in large calendar

Recent Posts

Recent Comments

Banners

Theme Grabber
Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2008 PowerShell from Japan!!