mardi 4 août 2015

Regex uppercase words with condition

I'm new to regex and I can't figure it out how to do this:

Hello this is JURASSIC WORLD shut up Ok

[REVIEW] The movie BATMAN is awesome lol

What I need is the title of the movie. It will be only one per sentence. I have to ignore the words between [] as it will not be the title of the movie.

I thought of this:

^\w([A-Z]{2,})+

Any help would be welcome.

Thanks.

Aucun commentaire:

Enregistrer un commentaire