in reply to Re: Substring consisting of all the characters until "character X"?
in thread Substring consisting of all the characters until "character X"?
substr($fullstring, $i, index($fullstring, ' ', $i) - $i);
I'll go with that (with the necessary check to make sure that the return value of index() is greater than $i). If I've learned one thing about regular expressions, it's that they start out easy enough to understand but get complicated and confusing very quickly.
|
|---|