Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3331966
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T23:38:18+00:00 2026-05-17T23:38:18+00:00

I need some help regarding how to split Chinese characters mixed with English words

  • 0

I need some help regarding how to split Chinese characters mixed with English words and numbers in PHP.

For example, if I read

FrontPage 2000中文版應用大全

I’m hoping to get

FrontPage, 2000, 中,文,版,應,用,大,全

or

FrontPage, 2,0,0,0, 中,文,版,應,用,大,全

How can I achieve this?

Thanks in advance 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T23:38:18+00:00Added an answer on May 17, 2026 at 11:38 pm

    Assuming you are using UTF-8 (or you can convert it to UTF-8 using Iconv or some other tools), then using the u modifier (doc: http://www.php.net/manual/en/reference.pcre.pattern.modifiers.php )

    <?
        $s = "FrontPage 2000中文版應用大全";
        print_r(preg_match_all('/./u', $s, $matches));
        echo "\n";
        print_r($matches);
    ?>
    

    will give

    21
    Array
    (
        [0] => Array
            (
                [0] => F
                [1] => r
                [2] => o
                [3] => n
                [4] => t
                [5] => P
                [6] => a
                [7] => g
                [8] => e
                [9] =>  
                [10] => 2
                [11] => 0
                [12] => 0
                [13] => 0
                [14] => 中
                [15] => 文
                [16] => 版
                [17] => 應
                [18] => 用
                [19] => 大
                [20] => 全
            )
    
    )
    

    Note that my source code is stored in a file encoded in UTF-8 also, for the $s to contain those characters.

    The following will match alphanumeric as a group:

    <?
    $s = "FrontPage 2000中文版應用大全";
    print_r(preg_match_all('/(\w+)|(.)/u', $s, $matches));
    echo "\n";
    print_r($matches[0]);
    ?>
    

    result:

    10
    Array
    (
        [0] => FrontPage
        [1] =>  
        [2] => 2000
        [3] => 中
        [4] => 文
        [5] => 版
        [6] => 應
        [7] => 用
        [8] => 大
        [9] => 全
    )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i want to know how to use ListView.FixedViewInfo, so i need some code spinet
I got a question regarding C++ Object & Javascript Object life cycle mis-synchronization and
He's the deal: I'm making some theorical research on .NET and Java platforms for
I'm new to the world of data migration and looking into ways to migrate
Hai Freinds So far i have used this coding to create a custom Control
So this is what I am trying to accomplish. I am trying to use
I am writing a web application that has a page that returns a list
In short: How can I use Hg to synchronize repositories between two computers using
I'm using open source component to retrieve emails from my mail server using vb.net
I am faced with a small project now,in which I have to present a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.