Regular Expressions 101

Community Patterns

FontAwesome CheatSheet to Array

0

Regular Expression
PCRE (PHP <7.3)

/
(fa-[a-zA-Z0-9]*((-)?[a-zA-Z0-9])*)((\s)?\(alias\))?(\s)?(\[)?(.{8})(\])?(\s)?([0-9]\.[0-9])?(.{2})
/
g

Description

Clean and convert FontAwesome CheatShee into array with "class" name and "unicode" code. Copy cheatsheet from FontAwesome CheatShee and paste on "test string".

Submitted by Mirdani Handoko - 7 years ago