Hi,
I am terrible with developing Regex patterns, and I'm hoping someone can help me. I need to develop a Regex pattern that will parse duplicate data from a string. The data is usually the same set of words 2X. For example one string might be "SAN FRANCISCO SAN FRANCISCO" and I want to return "SAN FRANCISCO". Another example might be "999 NW MAIN ST 999 NW MAIN ST" and I want to return "999 NW MAIN ST".
Before thinking about Regex, I was getting the length of the string, dividing by 2 and then using Left(), but that doesn't always work because I've found that the data can also include non-duplicated text (like "NEW YORK"), where unlike the previous examples it is not "NEW YORK NEW YORK".
Thanks in advance for your help.
I am terrible with developing Regex patterns, and I'm hoping someone can help me. I need to develop a Regex pattern that will parse duplicate data from a string. The data is usually the same set of words 2X. For example one string might be "SAN FRANCISCO SAN FRANCISCO" and I want to return "SAN FRANCISCO". Another example might be "999 NW MAIN ST 999 NW MAIN ST" and I want to return "999 NW MAIN ST".
Before thinking about Regex, I was getting the length of the string, dividing by 2 and then using Left(), but that doesn't always work because I've found that the data can also include non-duplicated text (like "NEW YORK"), where unlike the previous examples it is not "NEW YORK NEW YORK".
Thanks in advance for your help.