2

I want to get the time in the following line. I want to get the string

2017-07-07 08:30:00.065156

in

[ID] = 0,[Time] =  2017-07-07 08:30:00.065156,[access]

I tried this

 (?<=[Time] = )(.*?)(?=,)

Where i want to get the string in-between the time tag and the first comma but this doesn't work.

CodeGeek123
  • 4,341
  • 8
  • 50
  • 79

1 Answers1

2

[Time] inside a regex means a T, an i, an m, or an e, unless you escape your square brackets.

You can drop the reluctant quantifier if you use [^,]* in place of .*:

(?<=\[Time\] = )([^,]*)(?=,)
Sergey Kalinichenko
  • 714,442
  • 84
  • 1,110
  • 1,523