LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

string matching

Not only can't I match a  portion of a string, it returns more than it gets.  The program takes 30 secs to run and you must be connected to the internet.
0 Kudos
Message 1 of 13
(3,368 Views)
What are you trying to parse out? What is the command "curl"? You should provide a sample of the text you're trying to parse so that those who don't have "curl", whatever that is, can still debug your program.

As it is, if I go to the URL, it seems to display a time. The page source indicates the time information is contained withing <H2> tags. So, why in the second Match Pattern are you looking for "/r"? You should be looking for </H2>. Also, you can't enter \ codes the way you're doing it in "Normal" display mode. What you've entered is to basically tell the Match Patter to look for the "\" characters followed by the "s" character. That's not the same as looking for a space, which is what I suspect you're trying to look for. If you change to "\" Code Display mode you will see that the string displays "\\s". Delete one of the backslashes.
0 Kudos
Message 2 of 13
(3,359 Views)

Hey,

Additionally to smercurios answer, it seems that you wanna have a date and time-string. Why don't you use the LabVIEW function "Get Date/Time String.vi" withing the timing palette?

Christian



Message Edited by Christian_M on 04-04-2008 11:13 AM
0 Kudos
Message 3 of 13
(3,357 Views)
The idea is to set the computer clock to UTC time before using the get time vi's.
0 Kudos
Message 4 of 13
(3,353 Views)
curl is a unix call that displays the html script. very handy.
0 Kudos
Message 5 of 13
(3,352 Views)
So the problem was the /r should have been \r and in fact should have been \n.

Thanks.
0 Kudos
Message 6 of 13
(3,349 Views)

@exo wrote:
The idea is to set the computer clock to UTC time before using the get time vi's.

Normally the OS does this automatically. For instance, on Windows there's a Time Server service that allows you to sync with a time server. I'm sure an equivalent operation exists on other operating systems.
0 Kudos
Message 7 of 13
(3,346 Views)
Being a stock market watcher, at least in the past have noted the computer time is off from the stock market time. However, I will certainly check. Thanks
0 Kudos
Message 8 of 13
(3,344 Views)
Why don't you try curl and an IP address from your Windows command line and see what you get?
0 Kudos
Message 9 of 13
(3,343 Views)
C:\>curl
'curl' is not recognized as an internal or external command, operable program or batch file.

C:\>
0 Kudos
Message 10 of 13
(3,338 Views)