Home > front end >  what regex would help capture line matching with a string and also deleting every line after it?
what regex would help capture line matching with a string and also deleting every line after it?

Time:10-07

Lets say for example I need to strip this note.

What's Changed

Bug Fixes

yolo-123

Other Changes

234

45

I want to delete the line 'other Changes' and every line after it. Any easy regex i can use?

CodePudding user response:

This [\w\W\n\r] (?=Other Changes) will do it

enter image description here

  • Related