I'm trying to user the following regular expression to extract measurement values from sizes stated in text such as:
23 x 54mm
23 cm by 56cm
25 cm
4mm
5 centimeters
etc.
and have gotten this far with the expression but am returning pattern error:
"([\- ](mm|cm|millimeter(s)?|centimeter(s)?)(?![a-z/]))"
/
gm
All the errors detected are listed below, from left to right, as they appear in the pattern.
/ An unescaped delimiter must be escaped with a backslash (\)
Any suggestions on corrections?