notepad++ regex save custom info, but change brackets type -
so. have plenty of straigt in code like
*tons of text* get_sprite_ori('normal/mi/randomtextihavetosave.png') *tons of text*
i figured out how find kind of text: get_sprite_ori\('.*?'\)
have make text kinda that:
*tons of text* "images/sprites/normal/mi/randomtextihavetosave.png" *tons of text*
i tried "$1" , "images/sprites/$1", still changes on "" or "images/sprites/"
if still didn't understand: have tons of blocks these:
image mi serious voca = conditionswitch("persistent.sprite_time=='sunset'", im.matrixcolor(im.composite((1050, 1080), (0, 0), get_sprite_ori('normal/mi/mi_3_body.png'), (0, 0), get_sprite_7dl('normal/mi/mi_3_voca_dress.png'), (0, 0), get_sprite_ori('normal/mi/mi_3_serious.png')), im.matrix.tint(0.94, 0.82, 1.0)), "persistent.sprite_time=='night'", im.matrixcolor(im.composite((1050, 1080), (0, 0), get_sprite_ori('normal/mi/mi_3_body.png'), (0, 0), get_sprite_7dl('normal/mi/mi_3_voca_dress.png'), (0, 0), get_sprite_ori('normal/mi/mi_3_serious.png')), im.matrix.tint(0.63, 0.78, 0.82)), true, im.composite((1050, 1080), (0, 0), get_sprite_ori('normal/mi/mi_3_body.png'), (0, 0), get_sprite_7dl('normal/mi/mi_3_voca_dress.png'), (0, 0), get_sprite_ori('normal/mi/mi_3_serious.png')))
and have rid of scripts, coz they're in-built in new version of renpy use.
as has been mentioned, need use capturing group (a pair of unescaped parentheses) capture part of text part of regex pattern. first such pair capture first submatch can referenced using $1
(or \1
).
as regex, can replace .*?
[^']*
unlikely can have '
before )
. , add word boundary \b
match get
whole word:
\bget_sprite_ori\('([^']*)'\)
and replace images/sprites/$1
.
see settings:
Comments
Post a Comment