First before to use $regex in query params, need understand the nomenclature of nested query params format in feathersJS.
The [String|Number] represent a object value when the value inside of array is String. Meanwhile that value inside of array is a Number represent an array.
For example, for set a object like a value of name key need write like this: name[key]=value, this is equal to:
{
name: {
key: value,
},
}?name[$regex]=John
{
name: {
'$regex': 'John',
}
}?name[$regex]=joh&name[$options]=i
{
name: {
'$regex': 'joh',
'$options': 'i'
}
}?name[$regex]=^john$&name[$options]=i
{
name: {
'$regex': '^john$',
'$options': 'i'
}
}?$or[0][name][$regex]=joh&$or[0][name][$options]=i&$or[1][email][$regex]=@gmail&$or[1][email][$options]=i
{
name: {
'$regex': 'joh',
'$options': 'i',
},
email: {
'$regex': '@gmail',
'$options': 'i',
},
}
Remember that in order to query in URL params like the examples need use FeathersJS!