Hi there
it is not C syntax but regexp syntax, ^ means (at the beginning
of the string) and parenteses with | inside means, "one of
the following", so the first example will found
Contact: whatever(a)192.168.
Contact: whatever@10.
Contact: whatever(a)172.16.
m: whatever(a)192.168.
m: whatever@10.
m: whatever(a)172.16.
but WILL NOT found
anythingContact: ...
anythingm: ...
the second example will found both
From...
anythingFrom...
you problably get the picture now
hope this helps
!3runo
Che Sosa wrote:
Hello list,
I am not so familiar with C syntax but I suspect that the circumflex
changes the parsing method. What is the difference between these two:
first-> search("^(Contact|m): .*(a)(192\.168\.|10\.|172\.16)")
second-> search("(From|f):.*@foo.bar")
Questions:
1. How does the circumflex affect the string inside ( )
2. How is ( ) used?
Thanks,
Che