Hi team,
I have two different statement i want ref no
- N340222234818715TXN REF
- 2301060010001508 REF NO
N340222234818715 and 2301060010001508 I want this as output in regex form
Hi team,
I have two different statement i want ref no
N340222234818715 and 2301060010001508 I want this as output in regex form
Hi @Kuldeep_Pandey please try this,
testStr=“your values”
Checkout thois expression
System.Text.RegularExpressions.Regex.Match(InputString,"^\S+").ToString
In 1 TXN is also coming in don’t want this
EFT INCOMING
N340222234818715 NEFT IN
UTR CITIN22377099474
FROM ASAHI INDIA GLASS
LTD GUR
N340222234818715TXN REF
NO 30940
TRN REF NO:D01ZOAC223401Do0
is this regex statement will work in this?
This is what you need right ? @Kuldeep_Pandey
2nd one I need
Only N340222234818715 you need @Tapan_Behera1 ?
If yes you can try this @Kuldeep_Pandey
System.Text.RegularExpressions.Regex.Match(InputString,"^\S{16}(?=TXN)").ToString
Please try this
(?=N)\S{16}(?=.*REF)
System.Text.RegularExpressions.Regex.Match(InputString,"(?=N)\S{16}(?=.*REF)
").ToString`
Hope this is what youa re looking for… what it check is if there is ref and the balue starts with N and 16 characters
Cheers
A small modification fir this to work, change regex as below
(?=N|)\S{16}(?=.*REF)
Cheers