View Single Post
Old 05-23-2025, 11:37 PM   #10810
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 7,015
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by ThreeLizards View Post
So I tried adding the ^ at the beginning and I got an error message

54: Error: personal.ini Error 'Regular Expression Error 'global flags not at the start of the expression at position 1' in part ^(?i).*omega verse.*$' in line 'tags_modified=" blah blah blah

And I have it like

Spoiler:
Code:
 tags_modified=>(?i).*Protective.*$=>Trope: Protective


which does grab anything with the tag protective in it.. so maybe it just doesn't like the slashes?
The key phrase is 'global flags not at the start of the expression at position 1'

Use: (?i)^.*omega verse.*$
Note the ^ is after the (?i) switch.

The site https://regex101.com/ is very good about explaining *why* a regexp is wrong. Click Python for the Flavor.

Note that a quirk of FFF/Python3 is that you end up needing ^ and $ more often than not to match full strings.
JimmXinu is online now   Reply With Quote