Expression "*" invalid as a regular expression. Reason - Dangling meta character "*" near index 0
search cancel

Expression "*" invalid as a regular expression. Reason - Dangling meta character "*" near index 0

book

Article ID: 21377

calendar_today

Updated On:

Products

CA Harvest Software Change Manager - OpenMake Meister CA Harvest Software Change Manager

Issue/Introduction

When opening Workbench I see this error:

Expression "*" invalid as a regular expression.

Reason:
Dangling meta character "*" near index 0


If I click "OK", Workbench starts up with no further problem, but the error appears in the Output Log:

 

Environment

Harvest Software Change Manager v12.x and higher
Windows platform, Workbench and Eclipse Plugin environments

Cause

If you specify a Package Filter or Item search pattern that has an asterisk "*" as the first character, you will get this error. This is because filters and searches evaluate the search criteria as regular expressions (regex), and the meaning of a "*" is not the same in a regex as it is when you are matching file names at the command line.

Resolution

To resolve the issue:

  1. After Workbench has successfully started, click on the "Filter" icon  in the Explorer view toolbar. 


  2. You will see the error message box appear again.  Click "OK" to continue.

  3. On the Explorer View Filter window, delete the Package Filter Pattern, or change it so that the "*" character is not the first character in the pattern.  Then click "OK" to save your changes.

The next time you open Workbench you will no longer see the error message.

 

Additional Information

Here is the rule for regular expressions:

A "*" is invalid at the beginning of a regex. A "*" means zero or more of the previous character. Since there is nothing previous to the first character, you cannot put a "*" at the beginning of a regex.

More information about filtering the Workbench Explorer view is found here: Filter the Explorer View