Thread Suche regulären Ausdruck (2 answers)
Opened by Mia at 2004-06-02 15:50

foobar
 2004-06-02 16:30
#82945 #82945
User since
2003-08-04
69 Artikel
BenutzerIn
[default_avatar]
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/perl -w
use strict;

my $content = qq(Text Text, blabla blabla blabla. Text Text blabla. Text Text Text Text Text Schluesselwort.
Aufgabe: 1 Text Text Text S. 23
Aufgabe: 2 Text Text S. 24 - 25 );

$content =~ s|.*?Schluesselwort||gsi;
$content =~ s|(S\.[\d\-\s]+)|<seite>$1<\/seite>|gsi;

print $content."\n";

HTH\n\n

<!--EDIT|foobar|1086179515-->
The three chief virtues of a programmer are: Laziness, Impatience and Hubris
[Larry Wall]

View full thread Suche regulären Ausdruck