Re: OK, great regex and NVDA Dictionary Gurus
On Fri, 26 Mar 2021, Giles Turnbull wrote:
Tyler, the ALT+2032 keypad doesn't produce a character that NVDA describes as "prime"That was me, not Tyler. And you're right, it doesn't.
Although U+2032 is its code, I should have said: alt+8242, which is its Windows alt code for some reason. However, it turns out it only works in a handful of places. MS Word, for example. In places that expect only ASCII (Notepad, Notepad++), it only writes the number 2.
I was able to type prime prime (.*) prime prime
into Word (using the actual character, of course, and no spaces), and then copy and paste it into the NVDA dictionary add field.
Basically, I created the entry that Brian suggested, with "\1" as the replacement, and found that it works.
For the text from the facebook post, where there are two primes with spaces around them, I came up with this regex:
I don't know if that will send correctly, so it's:
prime, prime, left square bracket, up arrow (shifted number 6), prime, right square bracket.
For the replacement text, I used "
That makes the facebook message render with a quote replacing the primes if you read by line or page, and still tells you the primes if you move by character.
Here's the rundown on creating primes: https://www.webnots.com/how-to-type-prime-symbols-with-keyboard/
And here's some explanation of what primes are used for in language (read the full article for more uses): https://en.wikipedia.org/wiki/Prime_(symbol)#Use_in_linguistics