Matching everything after series of hyphens
I'm trying to capture all the remaining text in a file after three hyphens
at the start of a line (---).
Example:
Anything above this first set of hyphens should not be captured.
---
This is content. It should be captured.
Any sets of three hyphens beyond this point should be ignored.
Everything after the first set of three hyphens should be captured. The
closest I've gotten is using this regex [^(---)]+$ which works slightly.
It will capture everything after the hyphens, but if the user places any
hyphens after that point it instead then captures after the last hyphen
the user placed.
I am using this in combination with python to capture text.
If anyone can help me sort out this regex problem I'd appreciate it.
No comments:
Post a Comment