Substring manipulation (or just individual character manipulation in strings)
I am working on comparing two coll objects, one with a series of words, and another with a series of word segments (graphemes). I need to be able to take a word from coll 1:
1, phone;
and compare it with my list of graphemes in the second coll object (the first item):
ow, {ow}{ō};
oy, {oi};
p, {p};
ph, {f}{v};
pn, {n};
pp, {p};
ps, {s};
q, {k};
qu, {k};
r, {r};
re, {ə};
rh, {r};
rr, {r};
I wish that I could use a multiple input regex object or something, checking for the patterns as an argument, but that doesn't seem to be an option. I could use javascript and substr() and find some solution that way, but I was wondering if anyone had any tips (or know of any externals) for comparing string segments, or individual character manipulation and comparison in general.
Is there any possibility that zl.sub could be used to isolate the characters from coll 1 using the characters from coll 2?
You need to parse words, not lists, so zl objects aren't going to help.
I'm sure there is an easier way to do this but you can process each word by dynamically creating a new regexp object for each phoneme. Something like this.