Regular Expressions 101

Community Patterns

Line feeds to html paragraphs

1

Regular Expression
PCRE (PHP <7.3)

/
[\n\r\0]*(?=\w)(.*)
/
gim

Description

Take the text from a textarea and surround text delimited with newlines with p-tags

Submitted by Bob M - 8 years ago