I've built some code in PHP before which reads a string of data and finds relevant parts based on selected criteria being a "match"

How can I do this in .net (VB)?

for example my string might be

B/E1297G

where the B/ with up to 6 charters is a order number?