You could modify your string to have a start-character and an end-character and then use non-blocking receiving like explained in the serial input basics tutorial example 3 receive with start / end-character
example
start-character "<"
end-character ">"
Start and end-character can be included or excluded in the variable that is used for receiving