LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading multi line text and count the lines

Hi need help let say i have multi line text and i need to count how many lines in the text.
 
Example this is the text.
 
"REC UNREAD","+60126422014",,"08/05/13,14:37:40+32"
**AC ok**
SED001 TESTING 14:33 13/05/08
12.12 VOLT
DR1=OP,DR2=OP,MTD=OFF,RSP1=REP,RSP2=REP,RSP3=REP,SA1=REP,SA2=REP,SA3=REP,RAS1=REP,RAS2=REP,
 
some text many be more than 5 line.
 
Plz help.
0 Kudos
Message 1 of 8
(2,792 Views)
Hi jeyanthi,
you can for example use the search and replace function. Search for the line feed sign "\n". If you use LabView 8.x then you get a number how many signs are replaced. I´m not sure about the exactly version number.
Mike
0 Kudos
Message 2 of 8
(2,785 Views)

Hi jeyanthi,

see the attached example picture. The constant connect to the search and replace inputs is in "code display".

Mike



Message Edited by MikeS81 on 05-16-2008 08:00 AM
Message 3 of 8
(2,776 Views)
thnk u very much.Smiley Happy
0 Kudos
Message 4 of 8
(2,769 Views)

hi need help .. how to remove the first line only..line(0)

i just need line (1) and above

how can it been done

0 Kudos
Message 5 of 8
(2,698 Views)

Hi jeyanthi,

you can use the "Match Pattern" function. Search for "\n (Code Display)" and use only the string after match. Another solution is to create an array of it and remove the first line. Use the function depending on how you have the data. Smiley Happy

Mike

Message 6 of 8
(2,692 Views)
To see other ways to count lines you can see this response.
Message 7 of 8
(2,680 Views)
Thank you smercurio for attaching a wonderful link. Smiley Happy
- Partha ( CLD until Oct 2024 🙂 )
0 Kudos
Message 8 of 8
(2,648 Views)