Skip to content

Instantly share code, notes, and snippets.

@xivSolutions
Created September 6, 2014 14:59
Show Gist options
  • Save xivSolutions/78826966dc3ffd81035c to your computer and use it in GitHub Desktop.
Save xivSolutions/78826966dc3ffd81035c to your computer and use it in GitHub Desktop.
C# Regex to split string and Preserve quoted text
splitArray = Regex.Split(subjectString, "(?<=^[^\"]*(?:\"[^\"]*\"[^\"]*)*) (?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)")
@xivSolutions
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment