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

  • SEARCH
  • Home
  • 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 8394179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T19:59:25+00:00 2026-06-09T19:59:25+00:00

I want to find codes in a text, these codes can contain letters and

  • 0

I want to find “codes” in a text, these codes can contain letters and numbers and could have a different length. A text could look like this:

This is a example text, it contains different codes like this one 8de96217e0fd4c61a8aa7e70b3eb68 or that one a7ac356448437db693b5ed6125348.

How can I find and echo them in the correct order (from the first to the last one).
I think there is a way with prey_match(), but I don’t know how to make regular expressions. Additional information: the codes are all about 30 characters long and contain only lower letters and numbers.

Any help is really appreciated. Thank you!

  • 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-06-09T19:59:26+00:00Added an answer on June 9, 2026 at 7:59 pm
    preg_match_all("/[a-z0-9]{25,}/", $text, $matches);
    print_r($matches);
    

    Simple but should work for your case.

    Output:

    Array
    (
        [0] => Array
            (
                [0] => 8de96217e0fd4c61a8aa7e70b3eb68
                [1] => a7ac356448437db693b5ed6125348
            )
    
    )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the code in which i want to find out the greatest number
Where can I find the source code for Unix environment's cd command? I want
Could anyone find a way of improving this code a bit? I want to
I like thinking about how everything can be and is represented by numbers. For
I have these codes on my controller that gets the inputted value to the
I want to find a way to produce drop caps (large initial letters several
I want to have complex combobox with checkboxes, text, and may be a thumbnail.
I want to find the RSA code in both Javascript and Java code. And
Please find the code at http://jsfiddle.net/wlogeshwaran/NGL8P/4/ Here i want to make the 'hi' ,
i want to find the name of a colour from the hexadecimal colour code.

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.