Regular Expressions 101

Community Patterns

Split HTML string

0

Regular Expression
ECMAScript (JavaScript)

/
(&[A-Za-z]+?;)|(<.+?>)|(<\/\w+>)|([\w-]+)|([ ~!@#$%^&*()+=?:;"{}\[\]|,.\\/]+)
/
gm

Description

Extracts HTML tags, HTML entities, alphanumeric words, and the rest.

Submitted by Azmizar - 8 years ago