This is probably a super simple RegExp, but I'm really bad and can only get so far. So can some one help please :)
I want to test for a specific string that contains a number. So for example, string/[0-9]/[*]
. So some examples:
/string/12 = true
/string/0/ = true
/string/123/anything = true
/string123 = false
/string/123abc = false
So far, all I have got to it:
RegExp('/string/[0-9]').test('/string/123')
But this doesn't work for all the scenarios above.