How to understand and apply the regular foresight?

when writing Mini Program, I sometimes accidentally write the unit as px . But it is well known that Mini Program generally uses rpx as the adaptation unit.
then leads to the idea that you want to use the regular pattern of vscode and use foresight to judge the replacement.

Analysis:
uses px units usually preceded by numbers (\ d ), so should I just judge that there is a number in front of the match (\ d ), followed by px ?
or the matching letter px is not preceded by r .

the imaginary effect should be to use regular, insert a r before px, such as 100px = > 100rpx ;

tried to use regular matching, due to the lack of experience, did not write the correct regular, would like to ask dalao how to write?


find: (\ d +) px
replace: $1rpx


/[0-9]+px/

/ ^ [0-9] px$/


str.replace (/ (d +) px/g,'$1rpx')

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b36da0-2c063.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b36da0-2c063.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?