how to find white space between the string in coldfusion

I need to find the white space between a string in ColdFusion for example

str="ha    ppy"


i need to calculate how many white space between the str.

how to do that.


A simple regex:

<cfset str="ha    ppy">

<cfset spaces = reReplace(str, "\S+(\s+)\S+", "\1")>

    <pre>spaces = [#spaces#]</pre><br>

Need Your Help

Output for stargazer in R

r matlab stargazer

I follow the instruction of this article