ncarlier / feedpushr

A simple feed aggregator daemon with sugar on top.
GNU General Public License v3.0
346 stars 26 forks source link

How to make condition work in case insensitive? #61

Closed lukedoomer closed 2 years ago

lukedoomer commented 2 years ago

In other words, how to make matches and include in EXPR engine work in case insensitive?

ncarlier commented 2 years ago

matches works with a Go regular expression: https://pkg.go.dev/regexp/syntax@master So you can use this kind of expression: Title matches "(?i)HeLLoWoRLD"

in is not insensitive. However I will consider adding string manipulation functions such as toLower or toUpper as I already did in another project (https://github.com/ncarlier/readflow/blob/master/pkg/rule-engine/processor.go#L70)

ncarlier commented 2 years ago

Close by https://github.com/ncarlier/feedpushr/commit/11d053ff4ae191e9f6259bb2a5f5ee502374c87c