I need a regular expression that will take a line of words separated by spaces , '_' and or '-' and make an array of individual words.
* words must be no shorter than 3 characters.
* words must not contain any characters except a-z, A-Z and 0-9.
* words should not be greater than 45 characters.
* words must not be 4 or less characters and all numeric.
* words that are greater than 4 character and all numeric are allowed to maintain '-'.
* There should be no spaces in front, back or middle of word.
The end result should be an array of words that match the rule criteria. If you can't do all those rules in one regular expression let me know what the best scenario is.
Easter Sweets Basketâ?'?“ Pink Jelly 14-inch 75-80322 Plush Bear - Peanut Butter_Brown 6885 ReddingFullLengthDSet257RobertsLengthDSet257Roberts
This is what I have so far below. It just makes sure words are greater than 3 characters long.