06-18-2013, 02:21 PM
Hi Gintaras, hi all
i need a little help to tune a routine.
In some sentences I want to replace casing or value of certain patterns to keep them always in certain form.
Example, in english, the "i" meaning "me" should always be upper case.
So i did that, which works well:
str ff="the phrase where i want the i in upper case"
ff.replacerx("i" "I" 2|8|32)
out ff gives "the phrase where I want the I in upper case"
So far, so good.
But with certain patterns (i want to rephrase some classical music m4a tags) it fails.
no should become N°
Op. should become Opus
ff.replacerx("no" "N°" 2|8|32)
ff.replacerx("Op." "Opus" 2|8|32)
does not work.
All those patterns are alone, ie previous and following are spaces (bla no bla, bla bala Op. bla bla, my sentence with i is that...)
If you have a solution for the two examples or a better way to achieve my goal...
Thanks
i need a little help to tune a routine.
In some sentences I want to replace casing or value of certain patterns to keep them always in certain form.
Example, in english, the "i" meaning "me" should always be upper case.
So i did that, which works well:
str ff="the phrase where i want the i in upper case"
ff.replacerx("i" "I" 2|8|32)
out ff gives "the phrase where I want the I in upper case"
So far, so good.
But with certain patterns (i want to rephrase some classical music m4a tags) it fails.
no should become N°
Op. should become Opus
ff.replacerx("no" "N°" 2|8|32)
ff.replacerx("Op." "Opus" 2|8|32)
does not work.
All those patterns are alone, ie previous and following are spaces (bla no bla, bla bala Op. bla bla, my sentence with i is that...)
If you have a solution for the two examples or a better way to achieve my goal...
Thanks