I use a bunch of language-dependent regular expressions in my project,
For example (the simplest):
\b(one|two|three|...|\d+)\b
Therefore, I want to save these regular expressions as values-en/re.xml, and then use them through Context/ R.re.*to parse the string entered by the user.
<string name="number_re">\b(one|two|three|...|\d+)\b</string>
So, if he uses Russian and introduces some phrase in Russian, I will use values-ru/re.xmlwith some meaning, for example:
<string name="number_re">\b(|||...|\d+)\b</string>
Is this a suitable way (and it wonβt work on some special characters used both in string resources and in regular expressions), or is there another way to do this that I missed?