Functions / columns 'misinterpret' the single quote / apostrophe

Filter
NOT %title% MATCHES "^[a-zA-Z0-9äöüÄÖÜ=ß \-\(\)\/:,\.\?!#\+@_%'\*']+$"
is working fine.

If i try to express this in a column, it gives invalid syntax

$if($eql($regexp(%title%,'^[a-zA-Z0-9äöüÄÖÜ=ß \-\(\)\/:,\.\?!#\+@_%\*']+$',''),%title%),BAD,OK)

The reason is the check for ' (CHR(39)), if I ommit this, everything is fine.

If I double the single quote

$if($eql($regexp(%title%,'^[a-zA-Z0-9äöüÄÖÜ=ß \-\(\)\/:,\.\?!#\+@_%'\*'']+$',''),%title%),BAD,OK)

there is no invalid syntax error anymore, but the result is "OK" no matter on what "input string" I test it.

I discussed this in forum already, there You can see my "tries" and discussed with some other users.

(Felder/Tags automatisch nach Regeln prüfen - #32 by LyricsLover)

There might be an issue with functions / columns using "$if" especially with regexp...

Thanks for caring.

Please note that you have an apostrophe behind the % and 2 apostrophes following the *
With a test of just the regular expression

I get an "invalid syntax error"


If I remove the apostrope following the % then I get:

... what is that regular expression supposed to do?


  1. a-zA-Z0-9äöüÄÖÜ=ß -()/:,.?!#+@_%'*'' ↩︎

Same as

NOT %title% MATCHES "^[a-zA-Z0-9äöüÄÖÜ=ß \-\(\)\/:,\.\?!#\+@_%'\*']+$"

as a column function. I explained this in the linked post from the German Forum.

There I also explained why I wrote the 2 apostrophes (for testing reasons)

Did You test it with the $if-clause?
As I described it's maybe/obviously the $if working unexpected or buggy, not the regExp

It should not as the documentation says:

$iflonger(a,b,x,y) if string a is longer than number b, x is returned, otherwise y.

the correct syntax would be
$iflonger(ABC,5,Yes,no)
The second parameter must be a number - a string evaluates to 0 - and "A" is longer than zero.

Coming back to the regular expression:
To debug your expression in a systematic way I first tried the regular expression on its own - and at least in the demonstrated tests that did not produce a valid result.
You could guide me an tell me where my approach is not appropriate - that is why I documented it with screenshots.

@ohrenkino , ok, You're right concerning the $iflonger - I didn't read the "number" carefully and interpreted it (to me) equal to "string".

I suggest we discus the issue on this example further on on the "regular" forum and not in the bugs section - there we maybe / hopefully could post the result.

Is there any way to delete this post (for me as the original Poster)? I'd like to do some more tests before calling it a "Bug".

If you press on the 3 dots
image
in your original post, you should see a trash can:
image

Would have been a good idea before posting.
I move this thread to Support