javascript - Matching the character but not including that character and everything after -


before says it's duplicate of this or this. javascript doesn't have look behind i've been struggling this. have look ahead mentioned here

what want this. have :-
hey:blah,{'some':'obj','another':[4,5,0]}

i want extract after not including first :. output be:-
blah,{'some':'obj','another':[4,5,0]}

my attempt far:-
(:.+) //gives :blah,{'some':'obj','another':[4,5,0]} - note has :
[^\w:].+ //gives ,{'some':'obj','another':[4,5,0]} - not result expected. blah missing.

i'm trying in pure regex , trying avoid looping or string manipulation of sort.
attempt has been no avail far.

^[^:]*:(.*$) 

you can try this.grab group 1 .see demo.

https://regex101.com/r/vh0in5/1


Comments

Popular posts from this blog

firemonkey - How do I make a beep sound in Android using Delphi and the API? -

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -