LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

search and split the string

Well the error you describe with your picture is quite obvious. If you paste this:

 

<pays> Finland </pays> <ville> Tampere </ville> <temperature> 17~C </temperature> <ensoleillement> Nuageux </ensoleillement> <date>5 mai </date> <time> 3:00 pm </time>

 

into the string control called "Input", and then press enter with the marker somwhere in that line of text, like this:

 

<pays> Finland </pays> <ville> Tampere </ville> <temperature> 17~C </temperature> <ensoleillement>(Marker was here when you pressed Enter on your keyboard)

Nuageux </ensoleillement> <date>5 mai </date> <time> 3:00 pm </time> 

 

the output will contain that Enter press on your keyboard. Like this:

 

" Finland Tampere 17~C
Nuageux 5 mai 3:00 pm "

 

The regex does not take care of this.

 

Regards,
Even
_________________________________
Certified LabVIEW Associate Developer

Automated Test Developer
Topro AS
Norway
Message 21 of 22
(584 Views)

Hi,

 

I have a similar kind of problem. I use LabVIEW 7.1 version.

 

I want to extract certain parts from a text file as a string. For example, I have something like below in a text file,

 

{"sendsms":{"version":"0","id":"OP13","priority":"0","message":"line 1 \nline 2 \nline 3","receivers":["+6582876403"]}}

Now, I have to extract the message "line 1\nline2 \nline3" alone; I know I can use the string subset function; but for that I need to specify the offset and lenght of the substring. What I want is to extract the message in the double codes after "message" in the above line; so the message may vary and due to this I cannot use string subset function which requires me to input the string lenght and offset. So, I need to extract whatever is inside that double codes. How to solve this? Kindly help.

 

Thanks,

Govind

0 Kudos
Message 22 of 22
(540 Views)