Thread Regex-Problem mit Backreferences
(44 answers)
Opened by DemoFreak at 2004-02-04 14:37
[quote=Crian,04.02.2004, 13:48]Also $2 wird auf gar keinen Fall gehen, wenn Du im Suchteil schon auf gefangene Teile zugreifen willst, musst Du die Backslashvariante nehmen.[/quote]
das ist so nicht ganz richtig, denn mittels (?{ code }) kann man das: perl -wle '$_=23; m/(\d)(?{print "($1)"})/;' (2) Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Damian Conway in "Perl Best Practices"
lesen: ![]() ![]() |