Fixed sampling functions
Removed unnecessary regexp from test cases