Reputation: 267
I'd like to match a string so that
A: B: C
would return the match (note the space behind the colon)
A:
It matches everything until the first occurrence of a colon, but includes the colon and any spaces behind of it.
The pattern ^[^\:]+
would return A
but not the colon and the spaces.
Upvotes: 2
Views: 5904