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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T10:58:14+00:00 2026-06-03T10:58:14+00:00

Hello I need split a String by . Have : $string = Step one

  • 0

Hello I need split a String by “.”
Have :

$string = "Step one (30 min aprox.).Step two.Step three $12.00. Step four ud. visit ";

With:

preg_split('/[.]/', $string)

I get:

array(7) {
  [0]=>
  string(22) "Step one (30 min aprox"
  [1]=>
  string(1) ")"
  [2]=>
  string(8) "Step two"
  [3]=>
  string(14) "Step three $12"
  [4]=>
  string(2) "00"
  [5]=>
  string(13) " Step four ud"
  [6]=>
  string(7) " visit "
}

I just want this

[0] Step one (30 min aprox.)
[1] Step two
[2] Step three $12.00
[3] Step four ud. visit

The previous character (before ‘.’) cannot be a number or special char and the next character must be an uppercase letter.

NOTE: Step * is just a example

Hope help thanks!

  • 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-03T10:58:15+00:00Added an answer on June 3, 2026 at 10:58 am

    If you want a more general case, this might help.

    $string = preg_replace("/\.\s?([A-Z])/", "*****$1", $string);
    $array = explode("*****", $string);
    

    I have not tested it, but I think it will do what you want.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple string: data1:abc,123,xyz,data2:hello,goodbye I need regex to return a match collection
I have a string such as: "0123456789" And I need to split each character
Hello I need to have multiple language support of my django admin application.I can
I need to know how i can make a string like hello to Hello
Hello is have a question for a school assignment i need to : Read
I have strings that need converting like so, 'hello world' = 'helloWorld' And also
I need to get the last element of a split array with multiple separators.
Hello i need to get this date value from php 1328569380 and convert it
Sorry as the question is bit lengthy. I have this string Hello how are
I need to split a string based on some character array of separators and

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.