Invoice number extraction using Split

Hi,

Can anyone tell me how to extract the number without using substring operation?

INVOICE NO KAS0000062017

I need to get only KAS0000062017

3 Likes

fine
be like
in_str = “INVOICE NO KAS0000062017”

out_str = split(in_str," ")(2).tostring

Cheers @pradeep931

1 Like

invoice number

2503020660 Continued

how to get 2503020660 palaniyappan?

here we can use
in_str = “2503020660 Continued”
then
out_str = split(in_str," ")(0).tostring

Cheers @pradeep931

2 Likes

Thank Palaniyappan

1 Like

Use Matches to Get this
Regex = [^INVOICE NO]+$

do we have any other queries ot be discussed buddy
Cheers @pradeep931

I can think of one other way to tackle this problem using Replace:

string var = var.Replace("INVOICE NO ", “”);

Thanks chenderson, i will try it.

1 Like