Extract a sentence out of sentences separated by delimitors

Posted by Laura on Stack Overflow See other posts from Stack Overflow or by Laura
Published on 2013-10-19T15:36:52Z Indexed on 2013/10/19 15:54 UTC
Read the original article Hit count: 267

Filed under:
|
|

Below is a sample line I have extracted from a website:

below a satisfactory level; "an off year for tennis"; "his performance was off"

The output displays as:

below a satisfactory level; "an off year for tennis"; "his performance was off"

I want to get only the first sentence "below a satisfactory level";

Here is the code I have tried after exploring many stackoverflow posts:

$data=explode('; ',$str);
echo $data[0];

But somehow it is not working. Thanks in advance.

© Stack Overflow or respective owner

Related posts about php

Related posts about regex