On Dec 11, 2007 5:21 PM, Philip Hazel <ph10@???> wrote:
> It works in pcretest:
Hi, thanks for your answer and time, and the work on pcre of course!
I had it working with pcretest too, if the regex is:
/^\*\*\*\*\s*Starting\s*FICS\s*session\s*as\s*([^*]+)\*\*\*\*$/m
Although, if I give this string to pcre_compile, the C compiler will warn me
about invalid escape sequences: \* and \s.
And the execution of the regex will fail with return code -2. Here's the input:
http://pastebin.ca/812292
I don't know what the first strange character is, maybe some non printable
thing sent by the server I'm connecting to and whose output I need to
parse.
Notice that when I put that thing to a file, and add the regex as first line,
and then give that file to pcretest, I get:
pcretest foo
(Tue,Dec11) j
PCRE version 7.4 2007-09-21
/^\*\*\*\*\s*Starting\s*FICS\s*session\s*as\s*([^*]+)\*\*\*\*$/m
�
No match
**** Starting FICS session as iovsal ****
** Unknown option '*'
Today's Scheduled Events:
** Delimiter must not be alphameric or \
To join a scheduled tournament, join channel 49 (+channel 49)
** Delimiter must not be alphameric or \
For a complete tournament schedule, type "td help schedule"
** Delimiter must not be alphameric or \
All times are server times.
** Delimiter must not be alphameric or \
Index of new news items:
** Delimiter must not be alphameric or \
So there must be something else needed. I hope you can help me
more with this further information.
Thanks!
--
Salvatore Iovene
http://www.iovene.com/
Key Fingerprint: 5647 944D D5AD 2E87 00B4 7D54 2864 359D FF20 16D8