Skip to contentSkip to conversation

Parsing multipart MIME

DISCUSSION Darío Mariani 1 participant 1 message Aug 15, 2003

lore
Share & tools
lore
#0 lore raw

Hello:
I'm building a minimal MIME parser, mainly to separate the parts in a
multipart/form-data in a web POST. I was wondering if anyone made the regular expression for interpreting it. I thought of this:

multip ::= start anychar* (delim anychar*)* end?

anychar ::= <any character including \0>

delim   ::= <delimiter>
start   ::= "--" delim "\r\n"
middle  ::= "\r\n--" delim "\r\n"
end     ::= "\r\n--" delim "--"

I have little experience with grammars so this expression may be
wrong. Any ideas? thanks,

Darío

-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html