I have two types of Strings like the following :
78:24207 PERF keytouchListAction ProtocolSelect 04.00 : 1502876877199 1502876879180
or
78:27247 PERF create tab state : 1502876879180
I'm looking for a regex to delete the numbers at the start of the string 78:24207
to produice something like this :
PERF keytouchListAction ProtocolSelect 04.00 : 1502876877199 1502876879180
or
PERF create tab state : 1502876879180
and then if the string containt two numbers after the : take only the first number :
PERF keytouchListAction ProtocolSelect 04.00 : 1502876877199 1502876879180
becomes :
PERF keytouchListAction ProtocolSelect 04.00 : 1502876877199
I've tried this replace(/^\d+\.\s*/, ''); for the first pattern but does't seem to work.
and this pattern for the second problem replace(\:.*$) but nothing changed in my string.
Any hints on what I'm doing wrong ?
^(\d+\:\d+\s)was quite simple. --- You may not even need the capture group...