ncarlier / feedpushr

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

How to make condition work in case insensitive? #61

Closed lukedoomer closed 1 year ago

lukedoomer commented 1 year ago

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

ncarlier commented 1 year 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 1 year ago

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