Skip to content

Request: make preg_match for content types case insensitive #5

Description

@clone45

Hello,

We ran into a little problem with emails that have content types that look like:

Content-type: text/html; charset=utf-8

The regular expression in plancake email parser looks like this:

if (preg_match('/^Content-Type: ?text/html/', $line, $matches)) {

This regular expression won't match because of the capitalization of the "t" in "-type". In other words:

Content-type: << ours
Content-Type: << expected

How about making the preg_match case insensitive?

Cheers, and thanks for the wonderful tool!

  • Bret

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions