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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T17:49:12+00:00 2026-06-06T17:49:12+00:00

I built a regex to match sentences in a PHP script, it works great

  • 0

I built a regex to match sentences in a PHP script, it works great though, it misses the first sentence. Here is the PHP including the regex.

preg_match_all('([A-Z][^\.!?]*[\.!?]\s)', '$data', $arr, PREG_OFFSET_CAPTURE);

The string used for testing.

Persoonsgegevens van 84.000 Bol.com-klanten waren toegankelijk via een
lek in de site van een externe partij waar Bol.com mee samenwerkte.
Het ging om een kwetsbaarheid voor sql-injectie. De gegevens zijn
volgens Bol.com niet misbruikt.

De webwinkel heeft de getroffen klanten uit zichzelf geïnformeerd,
blijkt onder meer uit een topic op GoT. Het gaat om 84.000 klanten die
meededen aan de ‘kennismakingsactie’ Warm Welkom.

De klantgegevens stonden in een database van een externe partij waar
Bol.com mee samenwerkte voor de actie, zegt Bol.com-directeur Daniel
Ropers tegenover Tweakers.net. Van de klanten konden naam, geslacht,
e-mailadres en geboortedatum worden achterhaald; betaalgegevens waren
niet toegankelijk.

“We hebben gisteravond klanten geïnformeerd die eind vorig jaar hebben
meegedaan aan de marketingactie”, zegt Ropers. “Via het bureau dat de
actie heeft verzorgd waren gedurende een bepaalde periode gegevens
toegankelijk.” Het lek zou in ieder geval vorig jaar zomer al in de
software hebben gezeten. Sinds februari waren de gegevens versleuteld.
Volgens Webwereld gaat het om een lek in de tool amfphp.

Bol.com ondernam actie nadat het bedrijf werd getipt. Ropers: “Buiten
de tipgever is er niemand bij de data geweest; er is niets uitgelekt.
We zijn de tipgever zeer dankbaar.” Hij benadrukt dat Bol.com zelf
niet is gehackt, maar zegt ook dat het bedrijf desondanks zijn
verantwoordelijkheid wil nemen. “Voor alle bedrijven waar we mee
samenwerken hebben we security-checklists. Daar moeten we dus een stap
verder in gaan.”
Source: Tweakers.net

  • 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-06T17:49:14+00:00Added an answer on June 6, 2026 at 5:49 pm

    I would use this regex to match sentence:

    '.*?([\.!?]+|$)'
    

    Add a bit more tweaks here and there gives a better looking output for the test input (test input only – no guarantee for general text):

    /[\S].*?(?:[\.!?]+["]?(?=\s)|$)/
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to build a regex somewhat like this: [match-word] ... [exclude-specific-word] ... [match-word]
I built up this regex at http://regextester.com to parse YSOD but VS is complaining
Can't figure out how to automatically select a regex match in visual mode. For
I have a regex I need to match against a path like so: C:\Documents
With the help of some of the guys here I have some regex to
I have built a match pattern in RegexBuddy which behaves exactly as I expect.
Why is this code only spitting out the entire regex match instead of the
How to escape all regex characters automatically using built-in .NET mechanism or something like
I need to build a regex that match words with these patterns: Letters and
I have this regex I built and tested in regex buddy. _ [ 0-9]{10}+

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.