This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
Is there a method to split a string with a string? For example if I have "Johnny #1-15 Nevada State XYZ", could i use something like RegEx to parse the string using "Nevada State" and return "Johnny #1-15", and "XYZ"? Really only the first part is requeired but I imagine both would be returned if parsing is the trick. There are several example that tiptoe around this online but nothing that I have seen using a defined string to do this. In this case characters on the end, or right are inconsistent and there are no consistent special characters to utilize. Also note worthy is there is not always a number at the end of the first parse.
I don't see any direct way. The Text to Columns tool will treat each character as a delimiter and give strange results, and the RegEx tool would only extract "Nevada State".
Probably the best option would be to use a Replace() function to replace the text with a particular delimiter (maybe | since that's likely to be unique), that you use later in the Text to Columns tool.