using regular expressions instead of space separator