複数の行にわたって繰り返しパターンをキャッチするのに問題があります。 これは簡単なことですが、うまく動作しないようです。複数行にわたる正規表現のキャッチパターン
Check this example:Users of (.*\s*)
Users of 85838NAVSIM_F: (Total of 2 licenses issued; Total of 2 licenses in use)
----- ends here!
"85838NAVSIM_F" v1.000, vendor: adskflex
floating license
1 RESERVATION for PROJECT 1 (SRV02/27000)
----- should catch to here (and repeat on next)!
Users of 67600NAVMAN_F: (Total of 2 licenses issued; Total of 2 licenses in use)
"67600NAVMAN_F" v1.000, vendor: adskflex
floating license
1 RESERVATION for PROJECT 2 (SRV02/27000)
理由だけ.*
(?改行を含む任意の文字、複数回)は、複数の行をキャッチするのに十分ではないでしょうか?正規表現を意図したとおりに動作させるにはどうすればよいですか?
ありがとうございます!
ここでのルールは何ですか?どのようにパターンを定義しますか? –
私は次の出現まで "ユーザーの"と前方にキャッチしたいです。 – mottosson
https://regex101.com/r/SXeVCr/1のように –