Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
Python

r"
(^[A-Za-z]|(?<=[^\w])[A-Za-z]|(?<![A-Z])[A-Z])
"
g

Description

The meaning of the Regexp is create a 3 letters acronym from a given string.

i.e. Ruby on Rails = RoR HyperText Markup Languague = HTML

Submitted by Juan Mesa <linuxven@gmail.com> - 8 years ago