Skip to main content
Kofax

What may be the cause of inconsistent matching of spaces when using Regular Expressions in Format Locators in a KTM project?

14658

QAID # 14658 Published 

Question / Problem:

What may be the cause of inconsistent matching of spaces when using Regular Expressions in Format Locators in a KTM project?

Answer / Solution:

There are two elements which, in combination, may cause Regular Expression matches involving spaces to seem inconsistent.

  1. Spacing on a document can be interpreted by the Regular Expression engine as space characters OR tab characters.
  2. Contrary to many flavors of Regular Expressions, the engine used by KTM interprets \s ONLY as a space character rather than a more broad collection of whitespace characters such as tab and newline.

In situations where this may cause failed or inconsistent matching, use of \s can be replaced with [\s\t] which creates a character class that matches space or tab characters.

Applies to:

Product Version Category
AXPRO 4.5 Project Builder
AXPRO 5.0 Project Builder