(?<=Measured points: \r\n)(.*?)(?=ok)Ça s’arrête au premier OK, qu’il y ait une ou 20 lignes
(?<=Measured points: \r\n)(.*)(?=ok)
http://regexstorm.net/tester?p=%28%3f%3c%3dMeasured+points%3a+%5cr%5cn%29%28.*%29%28%3f%3dok%29&i=data.......+%0d%0aZ+search+height%3a+5.00+%0d%0aMeasured+points%3a+%0d%0a0.16250+0.13722+0.10944+0.07917+0.04639+0.01111+-0.02667+%0d%0a0.17278+0.15751+0.13492+0.10500+0.06776+0.02319+-0.02870+%0d%0a0.17917+0.16930+0.14939+0.11944+0.07945+0.02942+-0.03065+%0d%0a0.18167+0.17259+0.15287+0.12250+0.08148+0.02981+-0.03250+%0d%0a0.18028+0.16739+0.14535+0.11417+0.07384+0.02436+-0.03426+%0d%0a0.17500+0.15368+0.12683+0.09444+0.05652+0.01307+-0.03593+%0d%0a0.16583+0.13148+0.09731+0.06333+0.02954+-0.00407+-0.03750+%0d%0aok+%0d%0aX%3a2.42+Y%3a-3.02+Z%3a0.15+E%3a0.00+Count+X%3a+0.00+Y%3a-4.00+Z%3a0.34+E%3a0.00+%0d%0adata..........+&o=s
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionRegex.Matchou
Regex.Matches
Dim myString As String = Txt_data.Text Dim regex = New Regex("?<=Measured points: \r\n)(.*)(?=ok") Dim match = regex.Match(myString) If match.Success Then Txt_recup_point.Text = match.Value End If
?<=Measured points: \r\n)(.*)(?=ok
Dim regex = New Regex("(?<=Measured points: \r\n)(.*)(?=ok)")
Dim myString As String = Txt_data.Text Dim regex = New Regex("(?<=Measured points: \r\n)(.*)(?=ok)") Dim match = regex.Match(myString) If match.Success Then Txt_recup_point.Text = match.Value End If
Z search height: 5.00 Measured points: 0.16250 0.13722 0.10944 0.07917 0.04639 0.01111 -0.02667 0.17278 0.15751 0.13492 0.10500 0.06776 0.02319 -0.02870 0.17917 0.16930 0.14939 0.11944 0.07945 0.02942 -0.03065 0.18167 0.17259 0.15287 0.12250 0.08148 0.02981 -0.03250 0.18028 0.16739 0.14535 0.11417 0.07384 0.02436 -0.03426 0.17500 0.15368 0.12683 0.09444 0.05652 0.01307 -0.03593 0.16583 0.13148 0.09731 0.06333 0.02954 -0.00407 -0.03750 ok X:2.42 Y:-3.02 Z:0.15 E:0.00 Count X: 0.00 Y:-4.00 Z:0.34 E:0.00
Dim myString As String = RichTextBox_data.Text Dim regex = New Regex("(?<=Measured points:)(.*)(?=ok)", RegexOptions.Singleline) Dim match = regex.Match(myString) If match.Success Then Txt_recup_point.Text = match.Value End If
Num X,Y: 7,7 Z search height: 5.00 Measured points: 0.16250 0.13722 0.10944 0.07917 0.04639 0.01111 -0.02667 0.17278 0.15751 0.13492 0.10500 0.06776 0.02319 -0.02870 0.17917 0.16930 0.14939 0.11944 0.07945 0.02942 -0.03065 0.18167 0.17259 0.15287 0.12250 0.08148 0.02981 -0.03250 0.18028 0.16739 0.14535 0.11417 0.07384 0.02436 -0.03426 0.17500 0.15368 0.12683 0.09444 0.05652 0.01307 -0.03593 0.16583 0.13148 0.09731 0.06333 0.02954 -0.00407 -0.03750 ok X:2.42 Y:-3.02 Z:0.15 E:0.00 Count X: 0.00 Y:-4.00 Z:0.34 E:0.00 ok ok T:149.9 /150.0 B:60.9 /60.0 T0:149.9 /150.0 @:20 B@:14 P:59.3 A:31.7 X:2.42 Y:-3.02 Z:0.15 E:0.00 Count X: 0.00 Y:-4.00 Z:0.34 E:0.00 ok ok T:149.9 /150.0 B:60.9 /60.0 T0:149.9 /150.0 @:20 B@:14 P:59.3 A:31.7 X:2.42 Y:-3.02 Z:0.15 E:0.00 Count X: 0.00 Y:-4.00 Z:0.34 E:0.00 ok ok T:149.9 /150.0 B:60.9 /60.0 T0:149.9 /150.0 @:20 B@:14 P:59.3 A:31.7 X:2.42 Y:-3.02 Z:0.15 E:0.00 Count X: 0.00 Y:-4.00 Z:0.34 E:0.00 ok
0.16250 0.13722 0.10944 0.07917 0.04639 0.01111 -0.02667 0.17278 0.15751 0.13492 0.10500 0.06776 0.02319 -0.02870 0.17917 0.16930 0.14939 0.11944 0.07945 0.02942 -0.03065 0.18167 0.17259 0.15287 0.12250 0.08148 0.02981 -0.03250 0.18028 0.16739 0.14535 0.11417 0.07384 0.02436 -0.03426 0.17500 0.15368 0.12683 0.09444 0.05652 0.01307 -0.03593 0.16583 0.13148 0.09731 0.06333 0.02954 -0.00407 -0.03750 ok X:2.42 Y:-3.02 Z:0.15 E:0.00 Count X: 0.00 Y:-4.00 Z:0.34 E:0.00 ok ok T:149.9 /150.0 B:60.9 /60.0 T0:149.9 /150.0 @:20 B@:14 P:59.3 A:31.7 X:2.42 Y:-3.02 Z:0.15 E:0.00 Count X: 0.00 Y:-4.00 Z:0.34 E:0.00 ok ok T:149.9 /150.0 B:60.9 /60.0 T0:149.9 /150.0 @:20 B@:14 P:59.3 A:31.7 X:2.42 Y:-3.02 Z:0.15 E:0.00 Count X: 0.00 Y:-4.00 Z:0.34 E:0.00 ok ok T:149.9 /150.0 B:60.9 /60.0 T0:149.9 /150.0 @:20 B@:14 P:59.3 A:31.7 X:2.42 Y:-3.02 Z:0.15 E:0.00 Count X: 0.00 Y:-4.00 Z:0.34 E:0.00
data....... Z search height: 5.00 Measured points: 0.16250 0.13722 0.10944 0.07917 0.04639 0.01111 -0.02667 0.17278 0.15751 0.13492 0.10500 0.06776 0.02319 -0.02870 0.17917 0.16930 0.14939 0.11944 0.07945 0.02942 -0.03065 0.18167 0.17259 0.15287 0.12250 0.08148 0.02981 -0.03250 0.18028 0.16739 0.14535 0.11417 0.07384 0.02436 -0.03426 0.17500 0.15368 0.12683 0.09444 0.05652 0.01307 -0.03593 0.16583 0.13148 0.09731 0.06333 0.02954 -0.00407 -0.03750 ok X:2.42 Y:-3.02 Z:0.15 E:0.00 Count X: 0.00 Y:-4.00 Z:0.34 E:0.00 data.......... ok data....... Z search height: 5.00 Measured points: 0.16250 0.13722 0.10944 0.07917 0.04639 0.01111 -0.02667 0.17278 0.15751 0.13492 0.10500 0.06776 0.02319 -0.02870 0.17917 0.16930 0.14939 0.11944 0.07945 0.02942 -0.03065 0.18167 0.17259 0.15287 0.12250 0.08148 0.02981 -0.03250 0.18028 0.16739 0.14535 0.11417 0.07384 0.02436 -0.03426 0.17500 0.15368 0.12683 0.09444 0.05652 0.01307 -0.03593 0.16583 0.13148 0.09731 0.06333 0.02954 -0.00407 -0.03750 ok X:2.42 Y:-3.02 Z:0.15 E:0.00 Count X: 0.00 Y:-4.00 Z:0.34 E:0.00 data.......... ok