Solved

Position based selection by attribute values

  • 6 September 2019
  • 7 replies
  • 0 views

Badge

i have to select based on position

select based on positions like first position Alpha and second position numeric or first two alphabets and last numeric

HSNAFD151212114A15A10ABBAC501D1D2D5D

is there any possibility to select yellow highlighted vales based on above parameters

 

Thanks in advance

icon

Best answer by danullen 6 September 2019, 07:49

View original

7 replies

Badge

To select the yellow values I would use a Tester with two lines of Contains Regex:

 

^\\d\\d[A-Z]$

 

^\\d[A-Z]$

The first regex says "from start of string (^), two digits (\\d\\d) followed by one capital letter ([A-Z]) and nothing more ($).

Userlevel 1
Badge +21

A string searcher with the following regular expression (match 1 or 2 digits followed by 1 letter). Features that match the expression exit via the matched port

^\d{1,2}[A-Z]{1}$
Badge

A string searcher with the following regular expression (match 1 or 2 digits followed by 1 letter). Features that match the expression exit via the matched port

^\d{1,2}[A-Z]{1}$

I was a bit uncertain about which other accepted combinations might appear in the OP's data, but if it's only these two variants then egomm's solution is of course slimmer and more direct.

Badge +3

To select the yellow values I would use a Tester with two lines of Contains Regex:

 

^\\d\\d[A-Z]$

 

^\\d[A-Z]$

The first regex says "from start of string (^), two digits (\\d\\d) followed by one capital letter ([A-Z]) and nothing more ($).

 

@egomm @danullen

@rakeshreddy0996 said "first position Alpha and second position numeric or first two alphabets and last numeric "

 

Wich is (literaly)

^[a-zA-Z]\\d.*$

and

^[a-zA-Z]{2}.*\\d$

 

You guys answer selection shown in the picture, which is not in accoredance with the question....

(or you can say this issue has 2 questions)

Also:

^\\d{1,2}[A-Z]$

Splitting in 2 regexps is not necessary.

The last {1} is superfluous.

Userlevel 1
Badge +21

 

@egomm @danullen

@rakeshreddy0996 said "first position Alpha and second position numeric or first two alphabets and last numeric "

 

Wich is (literaly)

^[a-zA-Z]\\d.*$

and

^[a-zA-Z]{2}.*\\d$

 

You guys answer selection shown in the picture, which is not in accoredance with the question....

(or you can say this issue has 2 questions)

Also:

^\\d{1,2}[A-Z]$

Splitting in 2 regexps is not necessary.

The last {1} is superfluous.

Well, the last part of the question said "is there any possibility to select yellow highlighted vales based on above parameters?" so that's the question we've answered :-)

Badge +3

@egomm

@danullen

 

Almost...;)

For he says, note the bold part...:

"

is there any possibility to select yellow highlighted vales based on above parameters"

 

The answer would be : "NO"

 

Badge

Well, the last part of the question said "is there any possibility to select yellow highlighted vales based on above parameters?" so that's the question we've answered :-)

Yes, the question and the example wasn't in accordance as I saw it, so I went for the example and thought I'd leave a wide open door for the OP's applications of the regex search. I'm a "teach a man how to fish"-kind of guy. :-)

Reply