How do I get the first number of a six-group string?

Source: Internet
Author: User
4wt667knxi

3j8fnobhjg

Xzkb9rnvzu

Rx1vju8sx5

Miao8facox

Jb2rc2ofnq

The above six groups of strings, are randomly changed, and now I want to get the first number of these six sets of strings, such as the six groups above I want to finally get: 439182, how should I write code?


Reply to discussion (solution)

$s = <<
 
 < pre=""> 
  

$s =<<< txt4wt667knxi3j8fnobhjgxzkb9rnvzurx1vju8sx5miao8facoxjb2rc2ofnqtxt;preg_match_all ('/(\d+?). *$/m ', $s, $m); Echo Join (", $m [1]);
439182
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.