Created
January 3, 2022 15:12
-
-
Save clouedoc/db9627034ab518da72cd2e056873ece2 to your computer and use it in GitHub Desktop.
Regexp to get the first line of text
This file contains 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
(?m)(?:(.+?)\n(?:(?:.+?)?\n)+.+?$)|(.+?$) | |
# Replace with "$1$2" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment