Help with using Python Regex to find a certain block of code ina file and replace it?
My question pertains to a source file having comment blocksformatted such as the following:
There are multiple blocks similar to this. And I need the firstoccurrence of this block. Here are a few stipulations:
What I have tried:
The problem with this is that when I go to print out what thismatches, it includes all of the lines that starts with “//# or //#”. The problem with that, is that i need only the firstoccurrence. additionally if i have anything in the file such as“//# [words…] “ it also includes this.
Any help would be greatly appreciated!
Help with using Python Regex to find a certain block of code in a file and replace it? My question pertains to a source
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am