Hi ,
I have the below string:
- Home 022-024272-701
- TAIEF Ibraheem 465234N01T8A
- Home 742419F55CT1
I need to peek what before Number For example :
- Home
- TAIEF Ibraheem
- Home
Could anyone share a regex or any other way of getting this Please .
Thanks .
Hi ,
I have the below string:
I need to peek what before Number For example :
Could anyone share a regex or any other way of getting this Please .
Thanks .
Hi @Teaf ,
Based on the Inputs you have provided, there seems to be a Space before a Number and the data before the Space constitutes to your Required Data to be extracted.
Keeping this mind, I think you can test with the below Expression :
(.*)\s\d
(.*)
is your required data, which in the Expression is a Group. Hence, You would need to get the First Group from the Result Match in the below way.
System.Text.RegularExpressions.Regex.Match(InputStr,"(.*)\s\d").Groups(1).ToString.Trim
InputStr
is the Input data variable
Let us know if this Expression doesn’t work for all your Test Data.
Thanks for your response.
Unfortunately doesn’t work for all data such as TAIEF Ibraheem 465234N01T8A
That is Strange, It does seem to be working on my end. Please let us know what is the exact input data that you have provided.
@Teaf You can Check the below Image of Extracted data.
Exact input :
TAIEF AL BAHUSSAIN 465234N01T8A AL RAJHI BANKING AND INV T CORP BR 192 JEDDAH EX Rate : SAR 1.0000000 AL RAJHI BANKING AND INV T CORP
Another Example :
CHARGES SAR 10.00 267128V1267A BANK AL BILAD TOTAL VAT SAR1,05 ON CHARGE AMOUNT SAR10,
I need to peek :
doesn’t work. The output :
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.