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

Question

Question

Delete line break in metadata

asked on June 27, 2019

Hi,

I have fields in metadata which contains some line break.

I want to delete them.

For example:

Date: 27/06/201

           9

Because of this line break my value is not a date anymore but a text.

Help please.

0 0

Answer

SELECTED ANSWER
replied on June 27, 2019
(\d{1,2}/\d{1,2}/\d{1,4})\s*(\d{1,3})

That is a super quick and dirty regex to capture dates and remove whitespace where an unknown amount of spaces and line breaks might exist somewhere in the year.  It works for your example and variations of 2019 including 201 9, 20 19, 2 019.

 

0 0
replied on June 27, 2019

Thank You Erik

It works !

0 0

Replies

replied on June 27, 2019 Show version history

I can think of two options.

  1. Have your DBA fix it in propval.
  2. Fix it with workflow
    1. search for every document with that field
    2. For each document
    3. Pattern matching for the date, removing white space
    4. Assign the pattern matching token to an actual date field so this can't happen again.
0 0
replied on June 27, 2019

Hi Erik

May i have the formula for removing line break in Pattern matching ?

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

Sign in to reply to this post.