drahak/Restful — pull request #46 by Racochejl (2014-09-14 19:39:42+00:00)
Title: Change regexp pattern to ungreedy

Regexp is greedy by default, which means, that the first occurrence of "+" after "/([^_]+..." tries to capture longest possible match, i.e. in string "idCategoryDefault" it match everything, that is not "_", longest possible occurrence, that ends with upper character. So the first matching group takes $1 = "idCategory", second $2 = "Default" and the final result is "idcategory_default". Ungreedy regexp returns "id_category_default", which is expected result.