I was surprised that I could not find a straightforward answer elsewhere. When speaking of "delimiters", I want to confirm the following.
Consider the two strings:
str1 = "Hello My Name Is Sam"
str2 = "Hello0My0Name0Is0Sam"
In str1, the symbol behaving as a delimiter (w.r.t. a sequence of "common characters" pulled from the English alphabet) is represented by the space character .
In str2, the symbol behaving as a delimiter (w.r.t. a sequence of "common characters" pulled from the English alphabet) is represented by the 0 character 0.
The question, specifically, is about how one should define delimiter. There are many classic examples that I have found when people refer to delimiters: spaces, commas, semicolons, etc...and then there are "bracketed delimiters" that come in pairs (e.g. (), [], etc). However, the definition seems like it should be much more general.
Consider this final string just to prove my point:
str3=ac1b238b3ca217ba1c234
In this string, I will bring to your attention the fact that 8, 7, and 4 are functioning as delimiters to alphanumeric set restricted to a,b,c,1,2,3.
If all of this is correct, then can a delimiter be thought of much more generally using this two step process?
- define a set of symbol that are "non-delimiters"
- every other symbol not defined in 1. is thus a delimiter.
Any insight is greatly appreciated. Thank you!