« Return to Thread: Simple matching question

Re: Simple matching question

by Randall Schulz :: Rate this Message:

Reply to Author | View in Thread

On Friday July 3 2009, Cees de Groot wrote:
> Hi,
>
> I'm writing some code to interpret MIME mails, and one of the things
> I want to do is create a matcher if the content-type says
> "multipart/* <garbage>" (multipart/alternative, multipart/mixed,
> multipart/related). I've scanned the Scala book up and down and
> (blame me) can't find a simple way to match on the beginning of a
> string save for the 'm','u','l',... Seq[Char] matching. Isn't there a
> simpler way?

Unless I'm misunderstanding you, a regular expression match is a good
fit for this sort of problem.


> TIA,
>
> Cees


Randall Schulz

 « Return to Thread: Simple matching question