-
-
Save Haseeb-Qureshi/b71e2554c0b99a5d294d to your computer and use it in GitHub Desktop.
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
test_string = <<-md | |
## Title1 | |
*markdown1 | |
## Title2 | |
*markdown2 | |
[link]: link | |
## Title3 | |
markdown with # in it | |
md | |
puts test_string.scan(/(##[^#]+)/m) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How do I capture each ##-delineated section separately, without cutting off everything after a single #?
Can't figure this out after a lot of Google searching. Tried negative lookahead groups but can't seem to figure out a working solution...