Handling Regex Patterns and Memory Management

Modified on Wed, 31 Jul at 12:50 PM

Issue: If a user provides an incorrect regex pattern, the system will look for this pattern in the dataset. If the pattern does not align to the data type selected by the user (for example, if it lacks expected spaces), the system will search for non-existent matches, which can result in memory exhaustion.
For example, if the regex pattern is [&;\\<>] and the user selects 'Invalid values' option in Data Generation that do not include spaces as expected by the regex pattern, this can result in memory-related issues.


Resolution: To address this issue, ensure to select the appropriate Data types that exactly match the intended regex pattern requirements. 
To align with the expected criteria and prevent memory-related problems with the provided regex pattern in the example, follow these steps:
 -  Navigate to the Data Generation section in the Main Canvas.
 - Uncheck the Invalid Values checkbox. 
By unselecting  'Invalid Values' check box in the Data Generation section, you ensure that the regex patterns are applied correctly according to the expected criteria.  


To access the Configuration settings (Business Rules) window to add the regex pattern, perform the following: 

Navigate to the Main canvas. In the Node configuration process, click the node to edit it. In the Node Configuration window, click the Edit icon corresponding to the feature for which you wish to add rules. The Control List Panel window appears, and you can access the Business Rules window by clicking the Business Rules button.


Issue: While using the regex pattern [&;\\\\<>] without specifying a range, it can lead to potential memory issues. For example, if the dataset is extensive or contains numerous occurrences of these characters, the system must track all matches it finds, potentially consuming excessive memory resources.


Resolution: To resolve memory issues: Specify ranges in your regex patterns. For example, [&;\\\\<>]{2,8} restricts the pattern to match between 2 and 8 occurrences of any character from the set &, ;, \, <, or >.




Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article