Identifying and receiving strings within a constant stream

I have a sensor that transmits a constant uncontrolled stream of data which consists of something like this:

…L=10.2L=10.2L=10.2L=10.2L=10.2…

Within the course of a program I need the Arduino to occasionally ‘listen’ to the serial port and sample this data to extract the ‘L=10.2’ part.

What is the best way of achieving this? Effectively I need it to start listening after the and capture a string of characters up until the .

I see no code, so what have you tried so far?

Ah ha…I have just found this in a reply to ‘Serial Input Basics’ which I think will work provided I can sample the stream occasionally…

const byte numChars = 32;
char receivedChars[numChars];

boolean newData = false;

void setup() {
Serial.begin(9600);
Serial.println("");
}

void loop() {
recvWithStartEndMarkers();
showNewData();
}

void recvWithStartEndMarkers() {
static boolean recvInProgress = false;
static byte ndx = 0;
char startMarker = ‘<’;
char endMarker = ‘>’;
char rc;

// if (Serial.available() > 0) {
while (Serial.available() > 0 && newData == false) {
rc = Serial.read();

if (recvInProgress == true) {
if (rc != endMarker) {
receivedChars[ndx] = rc;
ndx++;
if (ndx >= numChars) {
ndx = numChars - 1;
}
}
else {
receivedChars[ndx] = ‘\0’; // terminate the string
recvInProgress = false;
ndx = 0;
newData = true;
}
}

else if (rc == startMarker) {
recvInProgress = true;
}
}
}

void showNewData() {
if (newData == true) {
Serial.print("This just in … ");
Serial.println(receivedChars);
newData = false;
}
}

Yes, it works fine.