LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

HELP getting string with garbage value

Solved!
Go to solution

Here i have attached front and block diagrm and vi .Problem is im getting required string displayed and with that some not required string is also getting displayed.Help me with editing it.

NOTE:   if SL Number: matches then  90610003  should be obtained. But  in my code im getting

 

90610003
VLPN : KA-01 I-2000
Dest ID: 100
Over Speed: 15
Admin1 : 9538991097
Admin2 : 9538991096
Admin3 : 9880899964(NOT REQUIRED BOLD ONE)

 

Below is the text program from which i have been searching for required string

 

IRU details.txt

 

SL Number: 90610003
VLPN : KA-01 I-2000
Dest ID: 100
Over Speed: 15
Admin1 : 9538991097
Admin2 : 9538991096
Admin3 : 9880899964

-------------------------------------------------------------
kudos welcome
0 Kudos
Message 1 of 5
(2,418 Views)

Because with that function, you get everything after the matching string, which includes all the other lines.

 

What you could do is search the resulting string for a carriage return and return all the data before that.

0 Kudos
Message 2 of 5
(2,415 Views)

can you be more specific.Like in terms of block diagram

-------------------------------------------------------------
kudos welcome
0 Kudos
Message 3 of 5
(2,403 Views)
Solution
Accepted by topic author omprakash

Note:  It is also possible that you need to search for a \n (line feed character) or a \r\n (CRLF) but since you didn't save any real data in you VI, I can't be sure.

 

0 Kudos
Message 4 of 5
(2,398 Views)

Smiley Happy...thank u.

-------------------------------------------------------------
kudos welcome
0 Kudos
Message 5 of 5
(2,391 Views)