regex - How do I extract all numbers at the end of a line that ends with "#.#ms"? -
i'm trying analyze log files. each line looks this:
2015-06-03 16:09:05,615 200 /url/endpoint (127.0.0.1) 19.15ms 2015-06-03 16:09:06,615 200 /url/endpoint (127.0.0.1) 2.19ms i've found if 'ms' wasn't there last one
\d*\.?\d*$ but last timestamp.
any thoughts or hints appreciated!
the ms part easy, because matched verbatim: if want matched @ end of string, put @ end of regex.
if each line terminated \n, use in regex:
\d+\.\d{2}ms\n depending on system, match end-of-line $ specifying multi-line option. way dependent on system provides regex implementation (demo2).
Comments
Post a Comment