I have the following 2 strings:
<span id="1-1" role="presentation" dir="ltr" style="left: 72px; top: 87.8641px; font-size: 11px; font-family: sans-serif; transform: scaleX(0.999349);"><span></span></span>
<span id="1-2" role="presentation" dir="ltr" style="left: 72px; top: 102.41px; font-size: 11px; font-family: sans-serif;"><div></div></span>
I have a regex that captures the left
and top
values in the style attribute.
However, there is also a transform property that is optional, and I’d like to capture it if it exists.
Here’s what I came up with:
<span id="1-[1|2]".*?left:s(.*?)px.*?top:s(.*?)px.+?(transform:sscaleX((.*)))?.+?(?=">)
However, the value inside of scaleX(...)
is not being captured.
Any thoughts on what to do?