You are viewing limited content. For full access, please sign in.

Question

Question

regular expression in a field

asked on April 23, 2014

I have a field using a regular expression setup as follows:

\d\d-\d\d\d\d\d

it is for a project number. (12-12345) it all works fine and well. The only issue is when you want to do a search by field in the client, it will not find anything using the field with the regular expression in it.

 

I double checked the metadata and verified the data in the field. I even tried searching by template and that would not work either. The field constraint shows up in the search dialog correct but will not work. Not sure if this is a bug or if I am doing something wrong. 

Answer

APPROVED ANSWER
replied on April 24, 2014 Show version history

Thanks for opening a support case Casey. Upon further investigation, we were able to determine that the cause of the issue is related to having the field configured as an indexed field. A bug has been filed for the matter. The main issue is that the indexed field search isn't enclosing the search term in single quotes so the dash is actually treated as a MINUS search meaning it will return entries where the field has 12 but not 12345.

 

A possible workaround is to make the specific field with the constraint not an indexed field. Another option may be to use Web Access to search because that will send the correct search syntax.

Replies

replied on April 23, 2014

This works fine for me when I tested it in Laserfiche 9.1.1. If you're using that version of the software and still have an issue, please open a case with Laserfiche Support.

You are not allowed to follow up in this post.