Extract String

Hello. I would like to extract the word "PATTERN" from a file that occurs on mulitple lines:
{1:5TIROEKUDRSH0027000755}{2:O4351423051114PATTERN40130656410423N}

Thank you.

$ cat aa
{1:5TIROEKUDRSH0027000755}{2:O4351423051114PATTERN40130656410423N}
$ cat aa|sed -e "s/PATTERN//g"
{1:5TIROEKUDRSH0027000755}{2:O435142305111440130656410423N}

Thank you. Let me provide more detail. I would like to get the word "Pattern" plus the next 5 characters following:

In:
{1:5TIROEKUDRSH0027000755}{2:O4351423051114PATTERN40130656410423N}
Out:
PATTERN40130

Thanks.

Now there is a UUOC.

In resonse to the second question:

sed -n 's/.*\(PATTERN.....\).*/\1/' file

the best i can do so far....

$ cat aa
{1:5TIROEKUDRSH0027000755}{2:O4351423051114PATTERN40130656410423N}
{1:5TIROEKUDRSH0027000755}{2:O4351423051114PATTERN50130656410423N}
{1:5TIROEKUDRSH0027000755}{2:O4351423051114PATTERN60130656410423N}
$ while read all
> do
> expr substr "$all" 44 12
> done < aa
PATTERN40130
PATTERN50130
PATTERN60130

Thank you.