Reputation: 167
I want to remove the first three characters of the string and insert a hyphen between 3rd and 4th of the remaining 6 characters. For example Input:
123456789
Output:
456-789
My regular expression removes the first three characters, but I'm not sure how to insert hyphen.
(^.{3})(\w+) $2
Upvotes: 3
Views: 3695