Hi everyone,
I’m trying to create a custom qa check to verify product name formatting using Reyes.
The product source names follow these pattern
1_type 2_range 3_(an index which can have 2 different forms, “a-” or “A”) 4_accessories
The customer requires to use the index “A” only.
Basically I would need to know which segments contain the name in the source and in the target DON’T CONTAIN the proper translation, which is in the form
1 2 A4
I used matching groups to properly identify the source groups (expression)=n but I couldn’t figure out how to apply a negative search pattern.
Basically, it is the same check performed by the key terms qa, using a Regex pattern instead of a word list.
Would you please help?
thank you
You want to use PowerSearch in addition to Regex.
This video explains also how to use PowerSearch.
The minus operator in PowerSearch negates the expression.
I’m not sure if I understand your particular search string, but basically what you need to do is to create a matching group “1” in source, and then negate (minus sign) its resolved value (@1) in target:
Source: "(your_regex_pattern)=1"
Target: -@1
Regex: Enabled
PowerSearch: Enabled
Hi Pcondal and thank you so much for your quick reply.
I’ll give you an example so you can better understand the scenario. Let’s say we have this product codes:
BB 43mm a/22.2 IM
BC 44mm A33 USS
BB 44mm a/1 L
these are the proper translations:
BB 43mm A22.2 IM
BC 44mm A33 USS
BB 44mm A1 L
So basically, any product code is composed by:
Group 1 = a group of two letters, alternatively “BB” or “BC”
regex: ((BB)|(BC))
Group 2 = a group of one or more digits, followed by “mm”
regex [:digit:]+mm
An identifier, alternatively “A” or “a/”
regex ((a/)|A)
Group 3 = a group of up to 2 digits, eventually with decimals (just one)
regex [:digit:]+.?[:digit:]*
Group 4 = alternatively, “IM”, “USS”, “L”
regex (IM)|(USS)|(L)
I need know which segments contain product codes - regex ((BB)|(BC) [:digit:]+mm)=1
((a/)|A)([:digit:]+.?[:digit:]* (IM)|(USS)|(L))=2____ -
in source, and wrong translations in the target (i.e. codes THAT ARE NON NOTED in the proper form, which is @1 A@2.
Shall I use -@1 A-@2 as target regex?
For clarity and maintainability, you probably want to split up this check in several checklist items.
Also It is not clear to me if a “a/” sequence is correct in source but incorrect in target (i.e. “a/” must be replaced by “A” in target). If so, you can have an standalone check for that:
Source: a/([:digit:]+)=1
Target: -A@1
Regex: Enabled
PowerSearch: Enabled