How to parse data from a String in a Buffer

This usually is a job for a Regular Expression.
Some Links that might be helpful: MDN, RegExr - a playground, a recent post to a similar topic.