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

Question

Question

Metadata pulled via regular expression too long

asked on May 9, 2019

I have a file that is imported into Laserfiche from a shared drive.  A sample file name is "B1234 abcderfg hijklmop".  I have the following regular expression pulling metadata out of the name:

B(\d\d\d\d)    returns 1234

B\d\d\d\d\s*(.*)   returns abcderfg hijklmop     Metadata field called Description

This is working, but I have come across a situation where the file name is longer than the description field will allow.  I don't want to change the length of the field for Laserfiche.  Can I have the regular expression shorten the description?

 

0 0

Answer

SELECTED ANSWER
replied on May 9, 2019

Change the (.*) to (.{0,N}) where N is the length of your Description field.

2 0
replied on May 9, 2019

Worked perfectly. 

Thank you.

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.