I've the following XML (consider it as normal text) :
<TextView
android:layout_width="15dp"
android:layout_height="match_parent"
android:textSize="1.5sp" />
I'm using the following code to extract numbers, for example 15 and 1.5:
let largeOutputResult = inputXML.replace(/(\d+)(sp|dp)/g, (_,num,end) => `${num*1.5}${end}`);
The issue I found is when I run the code, it extracts 15, 1 and 5, not 1.5, how I can fix that?
Thank you.