Oct 17, 2008, 10:36 AM
Post #1 of 10
Substitute in a subparagraph
I'm trying to write a script which searches a file that contains a lot of paragraphs.
At first I need to check the paragraph's headline and if it matches I need to substitute a string in that specific paragraph only.
I know how to use m//g for search and s/// for substituting but I don't know how to to a "double search": after finding my match - finding another match inside.
I need to do that "double search" a lot of times, for matching more than just one paragraph.
Thanks a lot,