View Single Post
Old 02-09-2018, 01:27 PM   #1
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 854
Karma: 3341026
Join Date: Jan 2017
Location: Poland
Device: Various
Regex question -- All two consecutive words

I have a text:
Code:
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
My code:
Code:
\b\w+\b[,;.\s]*\b\w+\b
gives the results:
Code:
Lorem ipsum
dolor sit
amet, consectetur
adipiscing elit
I need:
Code:
Lorem ipsum
ipsum dolor
dolor sit
sit amet
amet, consectetur
consectetur adipiscing
adipiscing elit
Is it possible at all?
BeckyEbook is offline   Reply With Quote