pilot51 / voicenotify

Android app that speaks notifications
https://voicenotify.app
Apache License 2.0
165 stars 57 forks source link

Added regex support #142

Open idan-h opened 1 month ago

idan-h commented 1 month ago

Tested pr, quite simple, that adds regex support for the ignore, require, and replace functionalities.

It works by adding $regex: to the start of each string, and will else function as usual.

Might be worth adding some example patterns, maybe to the readme or something. Not a must.

An example pattern to insert the word space between numbers: $regex:(?<=\d)\s+(?=\d) replace with space

An example pattern to insert spaces between numbers: $regex:(?<=[0-9])(?=[0-9]) replace with

it is also possible to use group references by just typing $1, $2 etc.