speechd-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

regex: can't a text match several rules?


From: Jérémy Prego
Subject: regex: can't a text match several rules?
Date: Fri, 7 Jul 2023 05:59:57 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1

Hello,

this is my first post here, and I've come to broach a subject that's difficult to explain, so I'll do my best.

I've noticed that when reading a line, if I indicate a text that can be in several filters, only the first is taken into account, and the others are ignored.

my line is:
[ foo ]

my goal is to ignore the pronunciation of the bracket, as they are pronounced with my voice synthesis, and to replace foo with bar.

complexSymbols:
ignoreBracket    (.*?)(\[)(.*)(\])

symbols:

ignoreBracket     \1 \3     none

foo    bar    none

In this example, the brackets are ignored, but the foo is not pronounced bar.

I think it's from field 3 that I'm capturing and since it's captured in this rule, I'm not looking for others that might match.

i'm interested if there's a better way to get my goal

thanks !

Jerem



reply via email to

[Prev in Thread] Current Thread [Next in Thread]