RM
unread,Sep 14, 2020, 2:00:42 PM9/14/20You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Piszę obfuscator PHP. Chcę zamienić tekst:
$xyz = "Strona główna \\\$xyz \\\\$xyz";
na tekst:
$yajguiffxs_x_x_ = "Strona główna \\\$xyz \\\\$yajguiffxs_x_x_";
Używam wyrażeń regularnych. Próbuję takiego:
[^\\]?(\\\\)*\$([a-zA-Z_][a-zA-Z0-9_]+)
jednak wtedy obfuscator zamienia mi tekst na:
$yajguiffxs_x_x_ = "Strona główna \\\$yajguiffxs_x_x_
\\\\$yajguiffxs_x_x_";
czyli źle, bo po trzech slashach chciałbym $xyz a nie $yajguiffxs_x_x_
Proszę o pomoc w skonstruowaniu wyrażenia regularnego.