I try to express it should get after the first^\A{;}/z$
till the second;
;
Isaac Ferguson wrote:I have tried with the expression
^\A{;}/z$
salvin francis wrote:
and then do a substring from matcher1.end() to matcher2.end()-1 if both the finds are true ?
Henry Wong wrote:
You do know that you used the regular expression engine to do ... essentially an "index of" for the first two semicolon characters right
Henry Wong wrote:
Isn't it much easier to just use the indexOf()
Stephan van Hulst wrote:Salvin, it can be done using capturing groups. Describe the part of the input you want to capture, and then either see if the input matches(), or find() the next occurrence. Then return the value of the capturing group().
salvin francis wrote:
Stephan van Hulst wrote:Salvin, it can be done using capturing groups. Describe the part of the input you want to capture, and then either see if the input matches(), or find() the next occurrence. Then return the value of the capturing group().
I was just trying Stephan's proposal actually to see if I was in line with what he meant.
salvin francis wrote:I too said a Scanner is a better choice. I would have simply used a StringTokenizer
Java™ Platform, Standard Edition 8 API Specification wrote:StringTokenizer is a legacy class that is retained for compatibility reasons although its use is discouraged in new code.
it gives me other parts of the string like "HTTP Request" or others depending of the line it is reading from the textFile instead of stay getting every second element corresponding to miliseconds of every line.sc.next();
Isaac Ferguson wrote:
it gives me other parts of the string like "HTTP Request"
timeStamp
elapsed
12:41:43
287
12:41:43
495
12:41:43
672
12:41:43
676
sydneyHTTP
18:53:10
Isaac Ferguson wrote:Is it not what I sent to you? A repository with the minimal code?
returns a String properly. All is working now what I interestd is in apply CSS to that prints .outanalyzerReader.conector(file_name, loadUsers, loadTime)
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |