I am trying to find regex for 2 types of situations:
1. where string has letters repeating 3 times in the beginning like aaatgre, rrryutu, yyyuiop,www-retdfdf etc
2. where string has letters repeating 3 times in the end like rtyuiii, tyrdyyy, iioottqqq etc.
Can someone help me in building the regex for these two scenarios. Thanks !
Solved! Go to Solution.
yes this solves the problem. Also i am looking for repeating characters in the first 3 and last 3 characters in a string. I was able to get the first 3 characters using Substring function. How to extract the last 3 characters of the string?
I'm glad that worked.
To get the last 3 characters: use the same method you did on the first 3 but on a reversed string using this function first: ReverseString(
it worked! thanks a ton!
Here is a bit quicker solution using RegEx if you want to implement. I've parsed the text from the opening three characters and the ending three characters. \l is shorthand for undercase, so if the letters are all upper case, use \u, if they are combination of upper and lower, use \w an make sure the "case insensitive" box is checked in the configuration window.
Sean