I’d like to create a very simple regex search which searches exactly one simple word in a field.
Example:
front card: test1
back card: test2
The search
"re:^test1"
succeeds.
But the search
"re:^test2"
has no results.
I think that there are invisible characters before test2 because
"re:^.*test2"
works.
I came to this because I wanted to find spaces before the word. Therefore I used ^ (beginning of line):
"re:^ \w"
Of course this works only for spaces found in front card, too. Spaces at the beginning of back card are not found.
I think this regex searched in front and back in the last version before 2.24.0, but perhaps I overlooked it and it searched also only in front.
So, how can I search in back card for a single word with a space before the first letter? And why does the regex search differ between front and back card?
BTW With the end of line symbol ($) it’s vice versa:
"re:test2$" succeeds.
"re:test1$" fails.
"re:test1.*$" succeeds.
Thanks for clarification.
Thorsten