Regular expression help.
Kwok Peng Tuck <[email protected]> Mon, 10 Mar 2003 12:54:48 +0800
| Newsgroups | gmane.comp.jakarta.oro.user |
|---|---|
| Message-ID | <[email protected]> |
I'm trying to use a regular expression to obtain the contents of a text
file say between the start and end (which can occur many times in the
file):
2003-03-07 17:20:33 [6] DEBUG: type_name: deliver_sm
{
many lines to follow.
}
2003-03-07 17:20:33 [6] DEBUG: SMPP PDU dump ends.
But the result doesn't seem to work, and will continue on until the end
of the file.
Is there something wrong with my pattern ? My pattern looks like this :
String pattern = "\\s*type_name: deliver_sm\\s*([^\\f]*)\\s*SMPP PDU
dump ends.\\s*"
I'm using the Perl5Compiler. What can I do to correct the pattern ? I'm
kind of new at this.