-
Notifications
You must be signed in to change notification settings - Fork 2
MATCH_REPLACE
Cregrant edited this page Jun 11, 2023
·
3 revisions
Allows you to edit text files in your project, such as .smali and .xml.
- NAME: the name of the rule (optional)
- TARGET: the path to the text file you want to change. Supports Variables, Glob pattern and Static replacements
- MATCH: the text to be searched in the file
- REGEX:
trueif the text in theMATCHfield is a regular expression,falseotherwise - REPLACE: the result found in the file will be replaced by this text. If empty, the found result will be deleted. Supports Variables. Supports expressions like
${GROUP0},${GROUP1}etc
Remove debugging information from all .smali files:
[MATCH_REPLACE]
TARGET:
smali*/*.smali
MATCH:
\.source .+| \.line \d+| \.local .+| nop| \.prologue| \.end local .+| \.restart local .+
REGEX:
true
REPLACE:
[/MATCH_REPLACE]
Replace every 2 empty lines with one in the file abc.smali, whose path is not exactly known:
[MATCH_REPLACE]
TARGET:
smali*/abc.smali
MATCH:
\R\R
REGEX:
true
REPLACE:
[/MATCH_REPLACE]
Replace all the letters f with j inside the res/layout/ folder:
[MATCH_REPLACE]
TARGET:
res/layout/*
MATCH:
f
REGEX:
false
REPLACE:
j
[/MATCH_REPLACE]
Remove all spaces inside all application activities:
[MATCH_REPLACE]
TARGET:
[ACTIVITIES]
MATCH:
REGEX:
false
REPLACE:
[/MATCH_REPLACE]

