Here is a sample string that I am working with:
- - - some text followed by more - - followed by more - -
I need to find each occurrence of a - at the beginning of the line and replace with another character. So, if a - is to be replaced by ~, the final outcome will be
~ ~ ~ some text followed by more - - followed by more - -
I have tried (-).?, which selects all the -. If I put a ^ to indicate beginning of line, I get just the 1st '-'. If I give the pattern as ^((-)\s){3}, which selects the group, but then the group could be any number of - in the beginning, so - - some text is valid and - some text is valid and
- - - - some text is valid