Программа nhrplc очень зачетная, использую ее в составе своей утилиты Batch Apktool http://4pda.ru/forum/index.php?showtopic=557858
Назрел один вопрос, сам не могу разобраться, прошу помощи.
Есть строка в файле xml:
Код: Выделить всё
<com.google.android.gms.ads.NativeExpressAdView android:layout_gravity="center" android:id="@id/adView" android:layout_width="wrap_content" android:layout_height="wrap_content" ads:adSize="FULL_WIDTHx80" ads:adUnitId="@string/admob_native_publisher_id" xmlns:ads="http://schemas.android.com/apk/res-auto" />
Код: Выделить всё
-sre:(<\S*[^<]*)(android:id=\"@id/(?:[Aa][Dd][Ss]|[Bb][Aa][Nn][Nn][Ee][Rr]|[Aa][Dd][Vv][Ii][Ee][Ww]|[Aa][Dd][Vv][Ii][Ee][Ww]Layout)\")[^<]*(\"\s?/?>) -ft:$1$2 android:layout_width="0.0dip" android:layout_height="0.0dip" android:visibility="gone$3
Код: Выделить всё
nhrplc -list:res.txt -notitle -o:d *.xml
Код: Выделить всё
Такой запрос не поддерживается. android:layout_width="0.0dip" android:layout_height="0.0dip" android:visi
bility="gone$3 (Такой запрос не поддерживается.)
Подскажите, что я неправильно делаю. Я попробовал сделать такую же замену через rxrepl https://sites.google.com/site/regexreplace/, все сразу получилось, но хотелось бы сделать это в вашей программе, она лучше)
В rxrepl, в случае замены через список в файле, можно использовать любой символ для обрамления поисковой и заменяемой строк
Если в этом проблема, то, может, и в nhrplc можно сделать подобным образом, для обходя ограничений парсера командной строки?You can provide search and replace options via an options file.
This allows you bypass the restrictions of the command line parser.
The search and replace text may be delimited in various ways:
--search(sample text) -s[sample text] -s<sample text> -s{sample text}
--replace|sample text| -r#sample text# -r~sample text~ -r:sample text:
--search?sample text? (where ? can be any printable character)
Спасибо)