Hello, I am struggling with a regular expression. I am using the regex- program given in Learning Perl, 3rd expression, but the results are strange.
I want to match the word "Stand" in the following line: <Li><!--: Stand: 2000-Oct-07, Eintrag in Digibib: 2000-Nov-16 :-- ><!--... DATENBANKEN ...--><!--... VOLLTEXTE ...--><!--,, Sammlungen ,,--><A HREF="http://www.erlangerliste.uni- erlangen.de" target="view_window">Erlanger Liste</a><BR><font size="2">(Linksammlung zu Germanistik, Malerei, Photographie und Computerkunst, Lexika; Browsen, Index und Volltext-Suche; Universität Erlangen-Nürnberg, Institut für Germanistik)</FONT><BR><font size="1">Link-Check: 2001-Mrz- 09</FONT> The regexprogram is: #!/usr/bin/perl -w use strict; while (<>) { chomp; if (/Stand/) { print "Matched: |$`<$&>$'|\n"; } else { print "No match.\n"; } } When I run the program with the line of text given above I get the result: No match However, If I run part of the line above against the program, e.g., <Li><!--: Stand: 2000-Oct-07, Eintrag in Digibib: 2000-Nov-16 :-- ><!--... DATENBANKEN ...--><!--... VOLLTEXTE ...-->< !--,, Sammlungen ,,--> I get the correct answer. If I search for the regex .* against the full line, I expect to get the whole full line as an answer. But it matches only: Matched: |<mlung zu Germanistik, Malerei, Photographie und Computerkunst, Lexika; Browsen, Index und Volltext-Suche; Universität Erlangen-Nürnberg, Institut für Germanistik)</FONT><BR><font size="1">Link-Check: 2001-Mrz- 09</FONT>>| Why is this so? asks a puzzled Anette -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]