How to find all the multi line pattern and redirecting it to a file?

I've a file like this

{multi line
     .......
     .......
  pattern}
{
some other stuff
     .........
}
{multi line
     .......
     .......
  pattern}
{
some other stuff
     .........
}

and so on

I want to redirect every multiline pattern in a new file using awk

---------- Post updated at 07:10 PM ---------- Previous update was at 07:05 PM ----------

I'm using the following command

awk '/start pattern/,/end pattern/' file_to_search > file_to_redirect
it's working but it is only extracting first pattern not the every multiline pattern

I'd say your startPat/endPat pai is good ONLY for the first 'block'.
Any leading/trailing spaces/tabs/etc...
Make sure it works for the others....

A sample would help as well....

I would suggest using csplit instead. It allows you to split a file based on a condition.

Make sure that the target directory for the files is empty before you start to make working through them/cleaning up easier later.

Does this help?
Robin