[Ilugc] [ilugc] [PHP] Need help in program

  • From: priyacst@xxxxxxxxx (priya cst)
  • Date: Tue, 10 Jan 2012 20:22:23 +0530

thank you.

On Tue, Jan 10, 2012 at 6:56 PM, Shrinivasan T <tshrinivasan at gmail.com>wrote:

The answer is given here:

http://stackoverflow.com/questions/8798248/how-to-split-tamil-characters-in-a-string-in-php

<quote>

I think you should be able to use the grapheme_extract [1] function to
iterate over the combined characters (which are technically called
"grapheme clusters").

Alternatively, if you prefer the regex approach, I think you can use this:

preg_match_all('/\pL\pM*|./u', $str, $results)

where \pL means a Unicode "letter", and \pM means a Unicode "mark".

</quote>

[1] http://php.net/manual/en/function.grapheme-extract.php
--
Regards,
T.Shrinivasan


My Life with GNU/Linux : http://goinggnu.wordpress.com
Free/Open Source Jobs : http://fossjobs.in

Get CollabNet Subversion Edge :     http://www.collab.net/svnedge
_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


Other related posts: