2016-10-06 9 views
0

こんにちはみんな私はメモ帳で単語の位置を切り替える必要があります++これらのようです。単語の位置をメモ帳++で前と後に切り替える

私はパイプ( |)の前と後の単語の相対的な位置を逆にしたい
hello word|miauw 
tommorow is nice|hhello 
work hard|world 
hello hello|day 

miauw|hello word 
hhello|tommorow is nice 
world|work hard 
day|hello hello 
+0

使用 '^([^ \ n個|] * \ |([^ \ n |] *)$ 'を置き換えて' $ 2 | $ 1' –

答えて

0

これは、仕事をする:

  • はCtrl + H
  • 検索結果:すべて

Regular expressionをチェックする必要があります置き換え$2|$1

  • ではなく. matches newline

    説明::

  • と交換

    ^  : begining of line 
    (.+?) : group 1, any character, 1 or more, not greedy (ie. until a ` character) 
    \|  : a pipe, escaped because it has special meaning within a regex 
    (.+?) : group 2 (same as group 1) 
    $  : end of line 
    
  • 関連する問題