Reply to regular expression space and 2 byte space

Your name:

Reply:


Posted by MD on 10/30/41 11:56

When receiving a particular string and if the string has a space/ 2 byte
space with some trailing string.
I want to remove the trailing string.

$somestring = "some string";
$match_pattern = "/(.*)\s.*/iu";

preg_match_all($match_pattern, $somestring, $match );
echo $match[1][0]

Looks like this only works for single byte space.

How can I define the regular expressoin so that it finds the 2 bytes space.

Thanks in advance.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация