Community Patterns

Community Library Entry

0

Regular Expression
Created·2022-09-28 07:56
Flavor·Python

r"
(?P<general>(?P<first>\d{1,3}[\.,']?\d{1,3}?)[xX](?P<second>\d{1,3}[\.,']?\d{1,3}?))
"
gm
Open regex in editor

Description

Getting sizes, formatted as in <width>x<height> or <height>x<width>. It supports up to 3 digits, with an additional, optional, decimal digit. The decimal point could be a comma, a point or even an apostrophe ( ' ).

Submitted by Hermes