xml - Regex last six digits -


i've tried equation several times. and, i'm using regex in xml grab last 6 characters of numeric string.

for instance, string: execid=238423842394283549283523

when won't work, mean still returns whole string instead of replacing last 6 digits.

i have xml file uses variables, , within file rule:

formattedtext="$(execid:r/.*(/\d{6}$)/$1/)"

my logs aren't telling me much. suggestions?

i'm not familiar regex in xml in python can match

r=re.compile("(.{6})$") match=r.findall(string)[0] 

be aware if use multiline (re.m) compiler consider "$" eol not eof when disable it should working


Comments