Thread Suche Regex (30 answers)
Opened by xAmp at 2009-09-23 14:49

LanX-
 2009-09-26 01:24
#126238 #126238
User since
2008-07-15
1000 Artikel
BenutzerIn

user image
2009-09-24T12:08:11 LanX-
Code (perl): (dl )
1
2
3
4
5
6
7
  DB<2> $re='(\d)\D*'x13

  DB<3> $t="12345Y"x10

  DB<4> print (join "", $t=~/$re/)
1234512345123
 


und nun als Einzeiler...

Code (perl): (dl )
1
2
3
4
  DB<1> $t="12345Y"x10

  DB<2> print ( join "", $t=~/${\ ( '(\d)\D*'x13 ) }/ )
1234512345123


Grüße
Golfing Rolfi 8)
Last edited: 2009-09-26 01:25:55 +0200 (CEST)

View full thread Suche Regex