Skip to main content

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

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

 

^\\d\\ddA-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 ($).


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}oA-Z]{1}$

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}oA-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.


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

 

^\\d\\ddA-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)

^

and

^

 

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.


 

@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 :-)


@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"

 


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