Spell Out the First Three lowercase letters
Moderator: Jim Bretti
Spell Out the First Three lowercase letters
Is there an expression I can use to allow the program to recognize the following text format “btnPrint”, three lowercase letters followed by another word beginning with an upper case? I would like the program to read all words of this format, “btnPrint” as “ b t n Print”
-
- Posts: 1558
- Joined: Wed Oct 29, 2003 11:07 am
- Contact:
Re: Spell Out the First Three lowercase letters
You should be able to handle something like this with a TextAloud pronunciation dictionary. You can use a regular expression to find text to replace, and respell the text using a TextAloud spell function to spell out the first three letters.
Here's how to do it. Click Control Center -> Pronunciation Dictionary Maintenance to open the dictionary maintenance dialog, select a dictionary (or create a new dictionary) then click File -> New Entry.
For the dictionary entry, set the Text Matching dropdown to Regular Expression, and use this for the expression:
([a-z]{3})([A-Z].+?)
Then set the Pronounce Using dropdown to Respell, and use this for the spelling:
##spell($1) $2
Also make sure the case sensitive checkbox is selected.
The regular expression should match text like btnPrint, and pronunce it as 'b t n Print'
Here's how to do it. Click Control Center -> Pronunciation Dictionary Maintenance to open the dictionary maintenance dialog, select a dictionary (or create a new dictionary) then click File -> New Entry.
For the dictionary entry, set the Text Matching dropdown to Regular Expression, and use this for the expression:
([a-z]{3})([A-Z].+?)
Then set the Pronounce Using dropdown to Respell, and use this for the spelling:
##spell($1) $2
Also make sure the case sensitive checkbox is selected.
The regular expression should match text like btnPrint, and pronunce it as 'b t n Print'
Jim Bretti
NextUp.com
NextUp.com
Re: Spell Out the First Three lowercase letters
Thank you. This works perfectly. You have saved me so much time.
Kind Regards.
Kind Regards.