I'm trying to capture whitespace characters when there are two or more of them in a row, as well as individual, non-breaking spaces. My RegEx pattern is as follows and currently achieves this:
/((\s| ){2,}| )/g
I would like to alter this pattern so that if two or more whitespace characters are only comprised of the tab \t character, then they are ignored. How would I do this?
Examples:
'\t\t' needs to be ignored
' \t' needs to be captured
'\t ' needs to be captured
' ' needs to be ignored
'\t' needs to be ignored
' \t' needs to be captured
' ' needs to be captured
' ' needs to be captured