Is there a way to match the zero-length position immediately following a known character (akin to matching essentially an insertion point that follows it?)
Consider this source text. In this example, I'm trying to match the zero-length positions immediately following any colons.
foo(laa:hee:)
Here's the same string but with pipe characters representing the locations I'm trying to match.
foo(laa:|hee:|)
The plan is to replace (or insert) values immediately after the colon, hence me wanting to match zero-length since everything else gets shifted to the right.
As an example, here's the same thing after the replacements are done. Here I've inserted '123' in the first "insertion" point, and '456' in the second.
Before: foo(laa:hee:)
After: foo(laa:123hee:456)
Since I don't know how to match nothing (i.e. zero-length), my thought is since I know there will never be whitespace characters, to match zero-or-more whitespace characters that immediately follow a colon. I think I'm supposed to use a look-behind or something but I'm not really sure how to structure this, or even if this is the correct approach.
Here's more examples followed by the same but with pipes where I'd like to match:
Original Desired Result
test(:) test(:|) <-- One match
test(foo:) test(foo:|) <-- One match
test(_:) test(_:|) <-- One match
test(::) test(:|:|) <-- Two matches
test(:laa:) test(:|laa:|) <-- Two matches
test() test() <-- No matches
If it matters, this is for Swift running on macOS.
Feedback on possible duplicate
I don't think this is a duplicate of the referenced question because that question talks about finding a specific string based on lookahead or lookbehind.
In my case I'm not looking for a string, but rather a position in a string (i.e. something that has zero-length), hence asking about the search pattern.