Can't gfigure out .htaccess


I have the following .htaccess code

RewriteRule ^categorie/(.+)-(.+)-p(.+).html$ categorie.php?cat_id=$2&current_page=$3 [L]
RewriteRule ^categorie/(.+)-(.+).html$ categorie.php?cat_id=$2 [L]

I want to pass the id of the category as the last part of the url just before .html. For some links it works but for some, it does not, and I cannot figure out why.

For example, this works: (it passes 27 as get parameter)

But this does not: (it passes mp3 as get parameter)

If I open (p2 sais it is the 2nd page), it works.

Please advise.
Thank you