Hi Everyone,
I want to extract only 1st ID(AB123456) from the below text. The below pattern is fixed and I need only the 1st ID in between the ‘##’ symbols.
## #AB123456# #AT9876543#
Hi Everyone,
I want to extract only 1st ID(AB123456) from the below text. The below pattern is fixed and I need only the 1st ID in between the ‘##’ symbols.
## #AB123456# #AT9876543#
Hello @Abhi15 ,
You can wither use regex expressions or split function to get the required data.
Please confirm whether the ID will always start with AB or please provide few more samples.
No The In ID may start with any number or letters, few examples below.
Eg: ## #2J7DMU00# #AT0388199#
## #70EQ2CP00# #AM3529053#
Also for some there won’t be the 1st ID in that case I need the output as empty or null. (Example: ## ## #FH3601019#)
regex.match(myStr.Replace("##",""),"\#.*?\#")
Removes the leading ## and then gets the first occurrence of text between a # and # character.
Hello @Abhi15 ,
The below method will extract the proper details. If the first id is there it will retrieve the ID, else Null.
Split(Split(Str," #“)(1).ToString,”#")(0).ToString
@Rahul_Unnikrishnan Thanks that works fine and is satisfying my condition.
Glad to hear that.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.