黄身 (トーク | 投稿記録)
編集の要約なし
黄身 (トーク | 投稿記録)
編集の要約なし
41行目: 41行目:
</source>
</source>
;Selection.Replace
;Selection.Replace
検索オプションを何も付けたくない場合はflagに0を指定する。
<source lang="javascript" style="word-wrap:break-word;">
//正規表現を使わず、大文字と小文字を区別せず、カーソル位置の次の一つだけ、単語の途中でもマッチする
Selection.Replace("x","y",0);
</source>
検索文字列が0x000aから始まるとき、meFindReplaceRegExpを指定しないと、meReplaceAllがおかしい。
検索文字列が0x000aから始まるとき、meFindReplaceRegExpを指定しないと、meReplaceAllがおかしい。
<source lang="javascript" style="word-wrap:break-word;">
<source lang="javascript" style="word-wrap:break-word;">
Selection.Replace("\n","",meReplaceAll); //最初の1つだけ処理される
Selection.Replace("\n","",meReplaceAll); //文書全体の最初の1つだけ処理される
Selection.Replace(";\n","",meReplaceAll); //全て処理される
Selection.Replace(";\n","",meReplaceAll); //全て処理される
Selection.Replace("\n;","",meReplaceAll); //最初の1つだけ処理される
Selection.Replace("\n;","",meReplaceAll); //文書全体の最初の1つだけ処理される
</source>
</source>
;Document.Text
;Document.Text
スポンサーリンク