I have a dynamic variable value which I want to truncate to the first 3 whole words. The full string is output using a code snippet like this:
So for example, lets say the value of this string is: Wella High Hair Crystal Styler
In perl, using the following regular expression match successfully pulls out the first 3 whole words:
$1 = Wella High Hair
However, when I tried to adapt this to an aspx .net page it was giving syntax errors:
I have tried testing it with \b and literal spaces using @ \\w but I can't seem to figure it out. What is the proper syntax to extract the first 3 whole words from a variable string?