hi, how can i check for a pattern occuring a certain number of times?
eg:
4444444 => return 4
4444332 => return 4
4444431 => return 4
4443333 => return 0
4243424 => return ?
but if character 4
occurs less than 4 times then return 0
i am just looking for 4
here. if it appears more than or equal to 4 times then value returned would be 4. the other 3 numbers in the string can range from 1 to 3 only.
thank you.