Recently I tried alot but I still unable to figure how should I able to validation for my text field. I hope I can get some help from here, my questions is I want to validate input text field only accept A-Z a-z 0-9 and space within word. And at least one char or number. For example, "abc def" , "abc092", "abcdef" Only in HTML input tag element . I tried this but this pattern unable to fullfil my requirements.
the pattern i want to achieve is
1) abc def 2) abcdef 3) abc123 4) a1b2c3 d4e5 5) allow to have empty space within words
the pattern i dont want to accept is
1) empty string 2) no alot of whitespace at the begining or end of the string 3) no bracket and etc special characters