Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
(?P<numerator>\d+)(\s?)\/(\s?)(?P<denominator>\d+)
/

Description

Fraction conversion regex for CS 1671

Submitted by Alex LaFroscia - 9 years ago