Created
March 27, 2025 00:40
-
-
Save pollusb/218cd5458541479cd737835c5661310b to your computer and use it in GitHub Desktop.
RegEx favorite patterns
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Remove empty lines (raw text) | |
-replace '(?m)^(?:[\t ]*(?:\r?\n|\r))+' | |
# Add a GO line every 5000 lines (in a SQL script file) | |
-replace '((INSERT.*\r\n){5000})', "`$1GO`r`n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment