Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for group matches in complexSymbols? #11107

Closed
sthibaul opened this issue May 4, 2020 · 0 comments · Fixed by #11116
Closed

Adding support for group matches in complexSymbols? #11107

sthibaul opened this issue May 4, 2020 · 0 comments · Fixed by #11116
Milestone

Comments

@sthibaul
Copy link
Contributor

sthibaul commented May 4, 2020

Hello,

In e.g. source/locale/fr/symbols.dic, we have

dates .	((?<=\b\d\d)\.(?=\d\d.(\d{2}|\d{4})\b))|((?<=\b\d\d.\d\d)\.(?=(\d{2}|\d{4})\b))
dates .	 	all	always	# point de date

so as to remove dots from the dates. This is relatively complex, and could be much better written with matching groups:

dates .	\b(\d\d)\.(\d\d)\.(\d{2}|\d{4})\b
dates .	\1 \2 \3 	all	always	# point de date

It would allow to write more easily such rules like:

price	\b(\d\+),(\d\+)\s?€\b
price	\1 euros \2	all	always	# prix à virgules

etc.

I would be just a few lines more in _regexpRepl to perform the group replacement, I can work on it if the principle is Ok? (basically it means making the replacement string interpret \ characters, thus allowing for this feature, and possibly even more in the future)

Samuel

sthibaul added a commit to sthibaul/nvda that referenced this issue May 5, 2020
sthibaul added a commit to sthibaul/nvda that referenced this issue May 5, 2020
sthibaul added a commit to sthibaul/nvda that referenced this issue May 5, 2020
sthibaul added a commit to sthibaul/nvda that referenced this issue May 5, 2020
sthibaul added a commit to sthibaul/nvda that referenced this issue May 7, 2020
sthibaul added a commit to sthibaul/nvda that referenced this issue Jun 11, 2020
sthibaul added a commit to sthibaul/nvda that referenced this issue Jun 11, 2020
sthibaul added a commit to sthibaul/nvda that referenced this issue Jun 11, 2020
sthibaul added a commit to sthibaul/nvda that referenced this issue Jun 11, 2020
sthibaul added a commit to sthibaul/nvda that referenced this issue Jun 11, 2020
sthibaul added a commit to sthibaul/nvda that referenced this issue Jun 11, 2020
sthibaul added a commit to sthibaul/nvda that referenced this issue Jun 11, 2020
sthibaul added a commit to sthibaul/nvda that referenced this issue Jun 11, 2020
sthibaul added a commit to sthibaul/nvda that referenced this issue Jun 11, 2020
sthibaul added a commit to sthibaul/nvda that referenced this issue Jun 12, 2020
sthibaul added a commit to sthibaul/nvda that referenced this issue Jun 12, 2020
sthibaul added a commit to sthibaul/nvda that referenced this issue Jun 12, 2020
sthibaul added a commit to sthibaul/nvda that referenced this issue Jun 12, 2020
sthibaul added a commit to sthibaul/nvda that referenced this issue Jun 12, 2020
sthibaul added a commit to sthibaul/nvda that referenced this issue Jun 12, 2020
sthibaul added a commit to sthibaul/nvda that referenced this issue Jun 12, 2020
sthibaul added a commit to sthibaul/nvda that referenced this issue Jun 12, 2020
sthibaul added a commit to sthibaul/nvda that referenced this issue Jun 12, 2020
sthibaul added a commit to sthibaul/nvda that referenced this issue Jun 12, 2020
sthibaul added a commit to sthibaul/nvda that referenced this issue Jun 12, 2020
sthibaul added a commit to sthibaul/nvda that referenced this issue Jun 12, 2020
sthibaul added a commit to sthibaul/nvda that referenced this issue Jun 12, 2020
sthibaul added a commit to sthibaul/nvda that referenced this issue Jun 16, 2020
sthibaul added a commit to sthibaul/nvda that referenced this issue Jun 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants