Example: there must be at least two digits in a given string independent of their position.
This will only work IF THEY ARE TOGETHER: /[0-9]{2}/
If they are separated like a1b2
it doesn't work.
EDIT: Thanks for the responses, but I realise this example was too trivial. Try this instead: there must be at least two digits in a given string AND two of the letter x AND two of the character & AND two of the letter J.
Wouldn't adding .* between every possible permutation get really lengthy? is there no way to not be concerned about the order?