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 7601331
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T23:08:31+00:00 2026-05-30T23:08:31+00:00

i have this string ++++++1DESIGNRESULTSM25Fe415(Main) and i have similar string about 2000 lines from

  • 0

i have this string ++++++1DESIGNRESULTSM25Fe415(Main)

and i have similar string about 2000 lines from which i want to split these..

[++++++] [1] [DESIGNRESULTS] [M25] [Fe415] [(Main)]

from the pattern only the 2nd 4h and 5th value changes

eg.. ++++++2DESIGNRESULTSM30Fe418(Main) etc..

what i actually want is:

  1. Split the first value [++++++]
  2. Split the value after 4 Character of [DESIGNRESULTS] so ill get this [M25]
  3. Split the value before 4 Character of [(Main)] so ill get this [Fe415]
  4. After all this done store the final chunk of piece in an array.

the similar output what i want is

Array ( [0] => 1  [1] => M25  [2] => Fe415 ) 

Please help me with 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-30T23:08:33+00:00Added an answer on May 30, 2026 at 11:08 pm

    Your data split needs are a bit unclear. A regular expression that will get separate matches on each of the chunks you first specify:

    (\++)(\d)(DESIGNRESULTS)(M\d\d)(Fe\d\d\d)(\(Main\))
    

    If you only need the two you are asking for at the end, you can use

    (\d)DESIGNRESULTS(M\d\d)(Fe\d\d\d)
    

    You could also replace \d\d with \d+ if the number of digits is unknown.

    However, based on your examples it looks like each string chunk is a consistent length. It would be even faster to use

    array(
       substr($string, 6, 1)
       //...
    )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this string: comment_1234 I want to extract the 1234 from the string.
i have this string string = <p>para1</p><p>para2</p><p>para3</p> I want to split on the para2
I have this string of numbers var array = 1,6,2,9,5 which is retrieved from
I have this string in PHP: $string = name=Shake & Bake&difficulty=easy; For which I
We have this string: according to posts #4,#5 and #6 the word... I want
I have this string: "My name is Marco and I'm from Italy" I'd like
I have this string that has illegal chars that I want to remove but
I have this string: <own:egna attribute1=1 attribute2=2>test</own:egna> I want to catch all attributes with
I have this string: $array= 'orange, fruit, apple juice' I want to count the
I have this String: player.login name=username;x=52;y=406 how would I be able to split it

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.