Input text 1 : [0001] HMP Direct Electronics - EU
Expected output : [0001] HMP
Input text 2 : [0001] HCP Do not use - Einkaufsorg. 0001
Expected output : [0001] HCP
Input text 1 : [0001] HMP Direct Electronics - EU
Expected output : [0001] HMP
Input text 2 : [0001] HCP Do not use - Einkaufsorg. 0001
Expected output : [0001] HCP
Hi @Sathish_Kumar_S
Use this below syntax:
strinput1= "[0001] HMP Direct Electronics - EU"
output1= System.Text.RegularExpressions.Regex.Match(strinput1,"\[\d+\]\s*[A-Z]+").Value
strinput2= "[0001] HCP Do not use - Einkaufsorg. 0001"
output2= System.Text.RegularExpressions.Regex.Match(strinput2,"\[\d+\]\s*[A-Z]+").Value
Hope it helps!!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.