For example if I have a doc with these 3 lines. I know ^feat
is matching the first feat
and how can I match the third line reg
? I tried ^reg
does not seems work.
feat(ad): make new ad
some note here
reg(ad): need a walk through
It meant to be used within a .changelogrc
file for https://github.com/rafinskipg/git-changelog
You can try using the following regex:
This regex will "eat" two lines from the beginning, and then check if
reg
appears at the start of the third line. Note that I used the quantity\n|\r\n
to represent a newline, to cover both Windows or Linux (you never mentioned your OS).If you want to match any line which starts with
reg
then you can try: