1. Jonathan Ashwell
  2. Valentina Database ADK
  3. Wednesday, November 21 2018, 01:55 PM
  4.  Subscribe via email
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
Attachments (1)
Comment
There are no comments made yet.
Ivan Smahin Accepted Answer
https://regex101.com

Seems to be helpful to test regexes.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 1
Jonathan Ashwell Accepted Answer
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?
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 2
Ivan Smahin Accepted Answer
"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 ':'
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 3
Jonathan Ashwell Accepted Answer
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?
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 4
Jonathan Ashwell Accepted Answer
I think I may have found the answer:

user1 NOT regex ':'
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 5
  • Page :
  • 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