Thread optional match (2 answers)
Opened by linuxCowboy at 2014-06-16 22:34

linuxCowboy
 2014-06-16 22:34
#176089 #176089
User since
2014-01-29
30 Artikel
BenutzerIn
[default_avatar]
Code: (dl )
1
2
3
echo 'ax&bx&cx&dx' | PERL5OPT='w M5.10.1' perl -ne 'say "$1$2" if /(a[^&]*).*?(&c[^&]*)?.*/'
Use of uninitialized value $2 in concatenation (.) or string at -e line 1, <> line 1.
ax

Ich hätte gern Ausgabe ax&cx oder eben nur ax!??

View full thread optional match