Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save theShiva/7566874 to your computer and use it in GitHub Desktop.
Save theShiva/7566874 to your computer and use it in GitHub Desktop.
Regex Find and Replace First X Characters In Every Line: See expression in the gist. ^ is for beginning of line, and . is for 1 character.
To replace the first 4 characters in every line, use the find Expression below.
^.{4}
If the Editor does not honor the {3} i.e. the Regex find fails, use actual number of . like the following
^....
Leave Replace Expression Blank
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment