This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

Regular Expressions for parsing

1

Wondering if regex is a viable option for parsing message bodies for a custom protocol. I'm programming in C and using standard C-strings(char arrays) with the built in functions would rather cumbersome and problematic for the kind of parsing I'm doing.

Regular expressions would make it much easier for us.

So my questions are:

-Is it a realistic option?

-If so would I need to find my own libraries or are there ones already included with the wireshark source?

asked 15 Feb '11, 11:14

Rodayo's gravatar image

Rodayo
61111115
accept rate: 0%

edited 15 Feb '11, 11:14


One Answer:

1

Wireshark uses GLib, which has its own Perl-compatible regular expressions API.

answered 21 Mar '11, 21:27

cmaynard's gravatar image

cmaynard ♦♦
9.4k1038142
accept rate: 20%