the regexp is not having any pattern to match a space. Hence changed the documentation accordingly.
I think there is no use of using space literal match (/s) in the pattern. So I removed it and updated the snippet and it's document accordingly. Please review it and let me know if I am wrong.
Remove regex with complex look-behind matching, replace with simpler string functions