really bad with regular expression, so seeking help here the function i m writing is to accept an input, and return the normalized output so input must match certain, instead of listing all possible combination, is there someways to use RegExp?
e.g. jackjill | jack jill | jack-jill | jack&jill | jack & jill | jack-&-jill | jack and jill | jackandjill | jack-and-jill | jack n jill |..., the function will return 'Jack & Jill'
so input.match(/jack[ -&n]*jill/) covers the space, -, n, but how about the 'and'?