Regular Expressions 101

Community Patterns

Less number variables to dictionary

1

Regular Expression
PCRE (PHP <7.3)

/
(?:\@)(?<key>[\w\s-]*)(?:\:\s*)(?<value>[0-9]+)+(?<unit>[\w\s-]*)(?:\;)
/
gm

Description

extract keys and values from .less variables

Submitted by actarian - 9 years ago