Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $excerpts = array(
- "Hello world: This.is, your first post... Edit or delete it, then start blogging!",
- "Hello world: This.is, your first post… Edit or delete it, then start blogging!",
- );
- foreach ( $excerpts as $excerpt ) {
- preg_match( '#(.*?)([.!?]|…)(\s|$)#', $excerpt, $matches );
- if ( $matches )
- $excerpt = $matches[0];
- echo $excerpt . '<br />';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement