echo <<< Define vowels >>> define Vow [a|e|i|o|ä|u] ; echo <<< And then the rules ... >>>> define ai ä -> i || _ h ; echo <<< h rules >>> define h1 h -> 0 || _ [ä|a] .#. ; define h3 h -> 0 || ä _ ; define ht h -> t || _ o ; echo <<< Now for some X rules >>> define X1 ä -> 0 || .#. X _ ; define X2 X -> 0 || _ Vow ; define X3 X -> 0 || Vow _ ; echo <<< Vowel change rules >>> define iy i -> y || Vow _ ; define uw u -> w || Vow _ ; define ow o -> w || Vow _ ; define a1 ä -> a || _ ä ; define a2 ä -> 0 || _ a ; define a3 ä -> 0 || a _ ; define a4 a -> 0 || a _ ; echo s, t, l, such things define ss s e -> š || _ .#. ; define tc t -> č || _ e .#. ; define ll l -> y || _ e .#. ; define nn n -> ñ || _ e .#. ; define zz z -> ž || _ e .#. ; define dd d -> ǧ || _ e .#. ; echo <<< Now we compile >>> read regex [ ai .o. h1 .o. h3 .o. ht .o. X1 .o. X2 .o. X3 .o. iy .o. uw .o. ow .o. a1 .o. a2 .o. a3 .o. a4 .o. ss .o. tc .o. ll .o. nn .o. zz .o. dd] ;