SyntaxFix
Write A Post
Hire A Developer
Questions
you can replace your pattern with
regex = ur"\[P\]([\w\s]+)\[\/P\]"