I am using Sublime Text, and I was wondering if there is a way to do this with Regex:
I have multiple files that have different lines and text.
In each of them I have a line that starts with "NAME : " and continues with the name of the person:
NAME : john doe smith
I am looking to use Regex to replace the spaces found in the text john doe smith
with a character _
, basically after the text NAME :
, so the new line will be:
NAME : john_doe_smith
So far I have tried doing this: Matching the line that contains "NAME" (couldn't get it working with the full one "NAME : ") with Find:
^.*\b(NAME)\b.*$
But I don't know how to replace the spaces after the match.
Is there a way to accomplish this with Regex?