How to grep until a certain character?

Hi, so I have a file containing many repetitions of the pattern block displayed below:

>NM_13489075
ACGUGCUAGCUUAGCGA
AGCUAGCUGAUCGAUGC
ACGUAGCUAGCUGAUCG
GAUCGA
>NM_13489023
ACGUGCUAGCUUAGCGA
AGCUAGCUGAUCGAUGC
ACGUAGCUAGCUGAUCG
GAAGUC

I was wondering how to grep, for example, a block starting with the line containing "NM_13489075" and everything else after it until the line with ">NM_#######". So I want to grep:

>NM_13489075
ACGUGCUAGCUUAGCGA
AGCUAGCUGAUCGAUGC
ACGUAGCUAGCUGAUCG
GAUCGA

I'm doing this for the purpose of replacing the first line with something else, but keeping the rest intact and right under it to be echoed later.

Thanks for any help!

Try:

perl -n0e '/>NM_13489075[^>]*/;print "$&"' file

awk version:

awk '/NM_13489075/{print RS $0}' RS=\> ORS= file

try also:

awk '/NM_13489075/{print ">"$0}' RS="\n>" input

@rdrtx1: some awks allow RS to contain a regex (gawk and mawk), but POSIX specifies RS can only be a single character, so other awks will fail..

Thanks everyone! I actually tried Bartus' method first and it worked fine, but it's nice to see alternative methods. Thanks again!