Hi,
I have a string of marks which are of varying lengths and contain different symbols. I have used REGEX_CountMatches([field],'symbol',1) to count the number of times the symbol is in the string, however the symbol can be repeated for any number of times, stop and then start again. I need to count the number of times the symbol starts...
example:
xxxxxxYxxxxYYYxxxYYxxxxxxYYYYY
in the string above the RegEx function will give me 11 Ys, which is great but I also need to get an answer of 4 for this example.
Any suggestions?
Thanks.
Solved! Go to Solution.
Hi @TA_MBC
I'm assuming you're using Regex_CountMatches? A simple tweak to the code is required by adding + after the Y:
REGEX_CountMatches([field1], 'Y+')
You then get this output:
The + denotes to look for one or more instances of Y
That's perfect! thank you :)