1. Jonathan Ashwell
  2. Valentina Database ADK
  3. Mittwoch, November 21 2018, 01:55 PM
  4.  Abonnieren via E-Mail
I have a Text field (user1) in which two records have an entry. One has a colon in the text and one does not. If I search for the one with a colon with REGEX it works:

select * from thereferences where user1 Regex '[:]' -> 1 hit

But when I search for one *without* the colon using the ^ negate operator, I get 2 hits instead of one. Both records match.

select hit from thereferences where user1 Regex '[^:]' -> 2 hits

I've confirmed this in Studio. Is this not the right REGEX syntax? I'm not looking for a workaround, I need the REGEX negate search to work.

In the expectation that the negate search should work, I've attached a database you can use to test this.

Thanks,

Jon
Anhänge
Kommentar
There are no comments made yet.
Ivan Smahin Akzeptierte Antwort
https://regex101.com

Seems to be helpful to test regexes.
Kommentar
There are no comments made yet.
Jonathan Ashwell Akzeptierte Antwort
I did before I posted. When I test at that URL I get this

text = :

[:] -> one hit

[^:] - no hits

Which is what I expected.

Did you test the database I sent with Studio?
Kommentar
There are no comments made yet.
Ivan Smahin Akzeptierte Antwort
"Ivanov:"

[:] -> one hit
[^:] - 6 hits

Explanation: "Match a single character not present in the list below [^:]"
There are 6 such entries which are not matched to ':'
Kommentar
There are no comments made yet.
Jonathan Ashwell Akzeptierte Antwort
But in the context of a Valentina search we're looking for matching records, not how many characters within a field are not a certain character. Do you know would be the correct REGEX search in Valentina, then, for finding all records in which a particular field does NOT have a certain character?
Kommentar
There are no comments made yet.
Jonathan Ashwell Akzeptierte Antwort
I think I may have found the answer:

user1 NOT regex ':'
Kommentar
There are no comments made yet.
  • Seite :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 2 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories