This site requires JavaScript to be enabled
IE BUMPER

Product
Version
IncidentLookup using list
Language
How can we help?

Solution Suggestions

Please enter your question to get suggestions.
  Help
IE BUMPER
Categories
Boolean Operators
OR or vertical bar symbol (|)
Finds a match if either the terms exist in a document (a union using sets).
AND
Finds a match if both terms exist in a document (an intersection of sets).
NOT, minus (-), or exclamation point (!)
Excludes documents that contain the term after NOT (a difference of sets).
Wildcards
Asterisk (*)
The asterisk symbol performs a multi character wildcard search.
Percent sign (%)
The percent sign performs a single character wildcard search.
Phrases
Quotation marks (")
Use quotation marks to search for an exact phrase with multiple terms.
For examples and more information look at our Knowledge Base: Advanced Search On The Support Portal

Split a buffer into multiple buffers by different criteria (regular expressions)

We will use a feature of regular expressions to split a buffer into multiple buffers


Situation

Let's say you have a buffer like "INHSBC02134567" and you want to split said buffer into the following parts:
first should always be "IN" (buffer1), then any number of characters before the number starts (buffer2), then the first 3 digits of the number (buffer3), then the rest of the number (buffer4).

Solution

The regular expression to identify each chunk and assign it to a Named Capture Group (which will be translated into a buffer) looks like below:
(?<buffer1>IN)(?<buffer2>[A-Z]*)(?<buffer3>\d{3})(?<buffer4>\d*)

Used in a TBox Set Buffer teststep where we initially create the buffer and then verify it against the above regular expression, the scenario looks like this:



After executing this testcase there should be 4 buffers, each with the desired value.

Reference

Similar scenarios, but far more elaborate, are detailed in KB0012336 and KB0012364.
To test any regular expressions you can use the 'Online regex tester' linked under "Reference" in the left sidebar.

0 1

Nitiz Verma

Created: 2018-07-25 05:20:10

Tried it in Tosca 11.2,  does not work as expected it to.

The result log throws an error picking up the regex expression in double quotes and saying the values did not match.

I replicated the exact scenario as given in the picture.

0 1

Nitiz Verma

Created: 2018-07-25 05:20:12

Tried it in Tosca 11.2,  does not work as expected it to.

The result log throws an error picking up the regex expression in double quotes and saying the values did not match.

I replicated the exact scenario as given in the picture.

1 1

Prakaran Prakaran

Created: 2018-11-01 12:53:28

It's not working in  TOSCA 11.2.

For Example I have a Value "ACCUK_FORD", I need to pick only ACCUK, Can anyone please help.

IE BUMPER

Tosca is the perfect solution

Optimize - Manage - Automate

Download Trial