i have a string. there i need get a one word. this word is between space and point. for example
' 'word.
if it find many same pattern words, i need only first word.
i have a string. there i need get a one word. this word is between space and point. for example
' 'word.
if it find many same pattern words, i need only first word.
As far as i understand, you could try :
/\s(\w+)\./
preg_match('/\s(\w+)\./', 'abc. def. ghi.', $m);
echo $m[1],"\n";
output:
def