how to match a space in regular expression in javascript code example Example: regex space javascript var str = "Is this all there is?"; var patt1 = /\s/g;