• Description

    Sometimes simple recoginition is not sufficient to define what shall be searched for.
    Example: when searching for the first page of a document, simply searching for '1' may return error results if the document contains 10 or more pages (page 10, 11, ... will all be recognized as 'first page')

  • Answer

    Since PrintMachine Version 3.90.700 it is possible to search using 'Regular Expressions'.
    Regex (Regular Expressions) is a very sophisticated tool to define powerful search expressions.
    If you are not yet familiar with Regex please refer to the various sources in the internet, e.g. Wikipedia, or google for 'Regex'.
    If you are familiar with Regex the following example will make clear how to search for the very first page of a document, even if it contains 10 or more pages:
    In SearchString you just have to type "REGEX($regex-searchexpression$)".
    Example: "REGEX(\b[1]\b)" means that only a detached "1" will be recognized. Te first "\b" means: Word match Begin, second "\b" means: Word match End.

    Here you'll find additional information about Regex:
    http://www.addedbytes.com/cheat-sheets/regular-expressions-cheat-sheet/
    http://www.regular-expressions.info/examples.html
    Regex Test website: http://www.fileformat.info/tool/regex.htm

    There is also another solution in VB possible. Add following VB code to Input.bas:
    Private Sub OnDefinitionSearchString(ByVal lDefinitionId As Long, ByVal lSearchId As Long, ByVal sSearchedString As String, ByVal sStringFound As String, ByRef bAccepted As Boolean)
     If sSearchedString = "1" Then  If Val(sStringFound) = 1 Then bAccepted = True Else bAccepted = False
     End If
    End Sub

Date created:
01/22/2015 11:38:32
Last updated:
02/11/2015 10:25:47
Product(range):
OMS-500
Print