Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
(?<number> (?: \d+ (?:\.\d*)? )| (?:\d*\.\d+) )| (?<immediate> (?<str> (?: ' (?<__str__> (?:[^'\\]|\\')* ) ' )| (?: \ (?<__str__>.) ) )| (?<operator> (?: p| | R| \_| \-| | r| \∩| | \∞| \∅| \~| \/| \]| C| \%| P| \*| \^| \∪| d| \[| F| l| s| \!| \+| \=| h| f| c ) )| (?<apply>\$)| (?<space>\s+) )
/
mxuJ

Description

For a custom, nested stack, RPN calculator

Submitted by Alex Pilon - 9 years ago