f



only get data from "today" until "yesterday"

Hi, 

I will get only the code from the date "today" (should be displayed)
until "yesterday" (shouldn't be displayed)

This is the source code (all in ONE line): 
Quote: 
......muchHTMLcodeBefore...TR><TD ALIGN="RIGHT" class=bcText>
01/27/04</TD><TD ALIGN="RIGHT" class=bcText> 1154.25</TD><TD
ALIGN="RIGHT" class=bcText> 1154.75</TD><TD ALIGN="RIGHT"
class=bcText> 1151.00</TD><TD ALIGN="RIGHT" class=bcText>
1151.50</TD><TD ALIGN="RIGHT" class=bcTextRed>
-2.75</TD></TR></TABLE><TABLE WIDTH="100%" BORDER=0 CELLPADDING=2
CELLSPACING=1><TR><TD WIDTH="16.6666666666667%" ALIGN="RIGHT"
class=bcText>01/26/04</TD...and so on (all in one line)

I can regexp the html code with: 

[regsub -all {<[^>]*>} $line {} line] 

But how can I get only the data from the actual date (here 01/27/04)
to yesterday (here 01/26/04).

Thanks!
0
jagg1 (15)
1/28/2004 7:28:15 AM
comp.lang.tcl 23428 articles. 2 followers. Post Follow

4 Replies
9179 Views

Similar Articles

[PageSpeed] 13

Not sure what you ask, but

   regexp {.*?(01/26/04.*?)01/27/04} $line dummy stuff

might give you what you're looking for in $staff

hth
Ronnie

jagg wrote:
> Hi, 
> 
> I will get only the code from the date "today" (should be displayed)
> until "yesterday" (shouldn't be displayed)
> 
> This is the source code (all in ONE line): 
> Quote: 
> .....muchHTMLcodeBefore...TR><TD ALIGN="RIGHT" class=bcText>
> 01/27/04</TD><TD ALIGN="RIGHT" class=bcText> 1154.25</TD><TD
> ALIGN="RIGHT" class=bcText> 1154.75</TD><TD ALIGN="RIGHT"
> class=bcText> 1151.00</TD><TD ALIGN="RIGHT" class=bcText>
> 1151.50</TD><TD ALIGN="RIGHT" class=bcTextRed>
> -2.75</TD></TR></TABLE><TABLE WIDTH="100%" BORDER=0 CELLPADDING=2
> CELLSPACING=1><TR><TD WIDTH="16.6666666666667%" ALIGN="RIGHT"
> class=bcText>01/26/04</TD...and so on (all in one line)
> 
> I can regexp the html code with: 
> 
> [regsub -all {<[^>]*>} $line {} line] 
> 
> But how can I get only the data from the actual date (here 01/27/04)
> to yesterday (here 01/26/04).
> 
> Thanks!


-- 

----------------------------------------------------------------------
Ronnie Brunner                             ronnie.brunner@netcetera.ch
Netcetera AG, 8040 Zuerich   phone +41 1 247 79 79 fax +41 1 247 70 75

0
1/28/2004 9:36:28 AM
You might want to take a look at the htmlparse package in tcllib as a starting 
point (plus rolling your own simple state machine).

jagg wrote:

> Hi, 
> 
> I will get only the code from the date "today" (should be displayed)
> until "yesterday" (shouldn't be displayed)
> 
> This is the source code (all in ONE line): 
> Quote: 
> .....muchHTMLcodeBefore...TR><TD ALIGN="RIGHT" class=bcText>
> 01/27/04</TD><TD ALIGN="RIGHT" class=bcText> 1154.25</TD><TD
> ALIGN="RIGHT" class=bcText> 1154.75</TD><TD ALIGN="RIGHT"
> class=bcText> 1151.00</TD><TD ALIGN="RIGHT" class=bcText>
> 1151.50</TD><TD ALIGN="RIGHT" class=bcTextRed>
> -2.75</TD></TR></TABLE><TABLE WIDTH="100%" BORDER=0 CELLPADDING=2
> CELLSPACING=1><TR><TD WIDTH="16.6666666666667%" ALIGN="RIGHT"
> class=bcText>01/26/04</TD...and so on (all in one line)
> 
> I can regexp the html code with: 
> 
> [regsub -all {<[^>]*>} $line {} line] 
> 
> But how can I get only the data from the actual date (here 01/27/04)
> to yesterday (here 01/26/04).
> 
> Thanks!

-- 
+--------------------------------+---------------------------------------+
| Gerald W. Lester               | "The man who fights for his ideals is |
| Gerald.Lester@cox.net          |  the man who is alive." -- Cervantes  |
+--------------------------------+---------------------------------------+

0
Gerald.Lester (2014)
1/28/2004 2:34:06 PM
Ronnie Brunner <ronnie.brunner@netcetera.ch> wrote in message news:<4017829c$0$725$5402220f@news.sunrise.ch>...
> Not sure what you ask, but
> 
>    regexp {.*?(01/26/04.*?)01/27/04} $line dummy stuff
> 
> might give you what you're looking for in $staff
> 
> hth
> Ronnie

....from today until yesterday, must it be

regexp {.*?(01/27/04.*?)01/26/04} $line dummy stuff

?

Ok, this date is changing daily of course. Can I make set two vars
like $today and $yesterday which gives me the actual dates and say

regexp {.*?($today.*?)$yesterday} $line dummy stuff

?

Thanks
0
jagg1 (15)
1/28/2004 2:42:14 PM

jagg wrote:

> Ronnie Brunner <ronnie.brunner@netcetera.ch> wrote in message news:<4017829c$0$725$5402220f@news.sunrise.ch>...
> 
>>Not sure what you ask, but
>>
>>   regexp {.*?(01/26/04.*?)01/27/04} $line dummy stuff
>>
>>might give you what you're looking for in $staff
>>
>>hth
>>Ronnie
> 
> 
> ...from today until yesterday, must it be
> 
> regexp {.*?(01/27/04.*?)01/26/04} $line dummy stuff
> 
> ?
> 
> Ok, this date is changing daily of course. Can I make set two vars
> like $today and $yesterday which gives me the actual dates and say
> 
> regexp {.*?($today.*?)$yesterday} $line dummy stuff
> 

yes you can, but use "" instead of {} or it won't substitute
those variables and you won't get any matches

bruce

0
bruce-news (900)
1/28/2004 2:54:32 PM
Reply:

Similar Artilces:

"""""""""ADD ME""""""""""
Hi , Hope you are doing great. Please let me take this opportunity to introduce myself, Iam Karthik working with BhanInfoi Inc, a NY based company. We have consultants on our bench on various technologies, my request is to add me to your distribution list and kindly do send me the requirements. i have the below list available 1. Mainframe 2. Java 3.. Financial Analyst 4. Data Architect If there is any vendor ship agreement which has to be signed then I would like to take an opportunity to represent my company and expect your cooperation... ...

only get data from "today" until "yesterday" #2
Hi, I will get only the code from the date "today" (should be displayed) until "yesterday" (shouldn't be displayed) This is the source code (all in ONE line): Quote: ......muchHTMLcodeBefore...TR><TD ALIGN="RIGHT" class=bcText> 01/27/04</TD><TD ALIGN="RIGHT" class=bcText> 1154.25</TD><TD ALIGN="RIGHT" class=bcText> 1154.75</TD><TD ALIGN="RIGHT" class=bcText> 1151.00</TD><TD ALIGN="RIGHT" class=bcText> 1151.50</TD><TD ALIGN="RIGHT" class=bcTextRed> -2.75</TD></TR></TABLE><TABLE WIDTH="100%" BORDER=0 CELLPADDING=2 CELLSPACING=1><TR><TD WIDTH="16.6666666666667%" ALIGN="RIGHT" class=bcText>01/26/04</TD...and so on (all in one line) I can regexp the html code with: [regsub -all {<[^>]*>} $line {} line] But how can I get only the data from the actual date (here 01/27/04) to yesterday (here 01/26/04). Thanks! ...

"out" and "in out"
Hi i found the following explaination: In Ada, "in" parameters are similar to C++ const parameters. They are effectively read-only within the scope of the called subprogram. Ada "in out" parameters have a reliable initial value (that passed in from the calling subprogram) and may be modified within the scope of the called procedure. Ada "out" parameters have no reliable initial value, but are expected to be assigned a value within the called procedure. What does "have no reliable initial value" mean when considering the "out" parameter? By c...

"/a" is not "/a" ?
Hi everybody, while testing a module today I stumbled on something that I can work around but I don't quite understand. >>> a = "a" >>> b = "a" >>> a == b True >>> a is b True >>> c = "/a" >>> d = "/a" >>> c == d True # all good so far >>> c is d False # eeeeek! Why c and d point to two different objects with an identical string content rather than the same object? Manu Emanuele D'Arrigo wrote: >>>> c = "/a" >>>&...

"my" and "our"
Hi, while testing a program, I erroneously declared the same variable twice within a block, the first time with "my", the second time with "our": { my $fz = 'VTX_Link'; .... ( around 200 lines of code, all in the same block) our $fz = 'VTX_Linkset'; ... } So the initial contents of the $fz declared with "my" is lost, because "our" creates a lexical alias for the global $fz, thus overwriting the previous "my" declaration. It was my error, no question. But I wonder why Perl doesn't mention this - even with "use s...

"or" and "and"
Hi, I'm just getting to discover ruby, but I find it very nice programming language. I just still don't understand how the "or" and "and" in ruby... I was playing with ruby and for example made a def to print Stem and Leaf plot (for those who didn't have a statistics course or slept on it, e.g. http://cnx.org/content/m10157/latest/) Here is the Beta version of it: class Array def n ; self.size ; end def stem_and_leaf(st = 1) # if st != (2 or 5 or 10) then ; st = 1 ; end k = Hash.new(0) self.each {|x| k[x.to_f] += 1 } k = k.sort{|a, b| a[0].to_f <=&g...

why "::", not "."
Why does the method of modules use a dot, and the constants a double colon? e.g. Math::PI and Math.cos -- Posted via http://www.ruby-forum.com/. On Oct 26, 2010, at 01:48 , Oleg Igor wrote: > Why does the method of modules use a dot, and the constants a double > colon? > e.g. > Math::PI and Math.cos For the same reason why inner-classes/modules use double colon, because = they're constants and that's how you look up via constant namespace. Math::PI and ActiveRecord::Base are the same type of lookup... it is = just that Base is a module and PI is a float....

about "++" and "--"
why this program snippet display "8,7,7,8,-7,-8" the program is: main() { int i=8; printf("%d\n%d\n%d\n%d\n%d\n%d\n",++i,--i,i++,i--,-i++,-i--); } > why this program snippet display "8,7,7,8,-7,-8" Ask your compiler-vendor because this result is IMHO implementation-defined. Check this out: http://www.parashift.com/c++-faq-lite/misc-technical-issues.html#faq-39.15 http://www.parashift.com/c++-faq-lite/misc-technical-issues.html#faq-39.16 Regards, Irina Marudina fxc123@gmail.com wrote: > why this program snippet display "8,7,7,8,-7,-8&q...

"In" "Out" and "Trash"
I just bought a new computer and I re-installed Eudora Light on my new computer. But when I open Eudora, the "In", "Out" and "Trash" links are not on the left side of the screen the way they were on my old computer. How can I get these links back on the left side of the screen? Thank you. On 25 Mar 2007 09:49:22 -0700, "abx" <abfunex@yahoo.com> wrote: >I just bought a new computer and I re-installed Eudora Light on my new >computer. But when I open Eudora, the "In", "Out" and "Trash" links >are ...

Does it need a ";" at the very after of "if" and "for"
write code like: int main(void) { int a=10; if(a<20) {} } Compiler ok on dev-cpp . don't we have to add a ";" after if statement? marsarden said: > write code like: > > int main(void) > { > int a=10; > if(a<20) > {} > } > > Compiler ok on dev-cpp . don't we have to add a ";" after if > statement? The syntax for 'if' is: if(expression) statement There is no semicolon after the ) but before the statement. The statement is either a normal statement (which can be empty), ending in a semicolon:- if(expr) ...

Gary Sokolich """"""
"""""""""" http://www.manta.com/c/mmlq5dm/w-gary-sokolich W Gary Sokolich 801 Kings Road Newport Beach, CA 92663-5715 (949) 650-5379 http://www.tbpe.state.tx.us/da/da022808.htm TEXAS BOARD OF PROFESSIONAL ENGINEERS February 28, 2008 Board Meeting Disciplinary Actions W. Gary Sokolich , Newport Beach, California �V File B-29812 - It was alleged that Dr. Sokolich unlawfully offered or attempted to practice engineering in Texas (...) Dr. Sokolich chose to end the proceedings by signing a Consent Order that was accepted by ...

Question about "sprintf" "@" "do for"
Hello, this works: A1=3D1 A2=3D2 A3=3D3 i=3D1 vari=3Dsprintf("A%.f",i) print vari,"=3D",@vari i=3Di+1 vari=3Dsprintf("A%.f",i) print vari,"=3D",@vari i=3Di+1 vari=3Dsprintf("A%.f",i) print vari,"=3D",@vari do for [i=3D1:3]{ vari=3Dsprintf("A%.f",i) print vari } But I want to have "print vari,"=3D",@vari" in the loop. But it dosen't=20 work. Why can't I use "print vari,"=3D",@vari" in the loop? Is there a=20 solution for? J=C3=B6rg Jörg ...

puts "\\".gsub("\\", "\\\\")
Hello, I have a mini-ruby quiz. Guess what this line of code writes to the console, then try it for yourself: puts "\\".gsub("\\", "\\\\") Why is that so? Martin From: martinus [mailto:martin.ankerl@gmail.com]=20 # Hello, I have a mini-ruby quiz. Guess what this line of code writes to # the console, then try it for yourself: # puts "\\".gsub("\\", "\\\\") puts "\\".gsub("\\", "\\\\") \ #=3D> nil # Why is that so? faq. escaping the escape in sub/gsub. search the archives. maybe you want somethin...

how to change "/" to "\"
iam new to shell scripting and i have plz can anyone help in changing the pattrern "/" to "\" using the sed command. olympie@gmail.com wrote: > iam new to shell scripting and i have plz can anyone help in changing > the pattrern "/" to "\" using the sed command. sed 's/\//\\/g' will replace all '/' with '\' srp -- http://saju.net.in Saju Pillai <saju.pillai@gmail.com> wrote: >> iam new to shell scripting and i have plz can anyone help in changing >> the pattrern "/" to "\" using ...

"A" is not equal "A"?
I was trying to convert String Array to String A through cycle and than compare the result with String B but eventhough results were the same it returned false. I'am working in BlueJ 3.1.0 Code is: public boolean Method () { String[] Example = {"a","b","c"}; String A = ""; String B = "abc" for (int i = 0; i<3 ; i++) { A = A + Example[i]; } if (A == B) { return true; } } never got true... I appreciate any suggestions how to solve this Den 08.04.2014 10:06, skrev 245dav@gmail.com:...

How to change "/" to "\"
Now, the output as below /a/b/c.txt b/c.txt x:/b/c.txt , Need to change x:\b\c.txt #!/bin/ksh # echo.ksh a=/a/b/c.txt echo $a echo ${a#/*/} y=`echo x:/${a#/*/} | tr -s '/' '\'` echo $y moon wrote: > Now, the output as below > > /a/b/c.txt > b/c.txt > x:/b/c.txt , Need to change x:\b\c.txt > > > #!/bin/ksh > # echo.ksh > a=/a/b/c.txt > echo $a > echo ${a#/*/} > y=`echo x:/${a#/*/} | tr -s '/' '\'` > echo $y > > One escape necessary: echo x:/${a#/*/} | tr -s '/' '\\' Two escapes necessar...

"==" is NOT TRUE "==", WHY?
[CODE START] x=5; y=8; if (x + y + 1E-15 == 13) a = 3 else a = 8 end [CODE END] When x + y + 1E-15, the code above returns a = 8. When x + y + 1E-16, the code above returns a = 3. Why? Kindly advise. Thanks. "onemilimeter Chen" <onemm@example.com> wrote in message <g7adrj$5tr$1@fred.mathworks.com>... > [CODE START] > x=5; > y=8; > if (x + y + 1E-15 == 13) > a = 3 > else > a = 8 > end > [CODE END] > > When x + y + 1E-15, the code above returns a = 8. > When x + y + 1E-16, the code above returns a = 3. > > Why? ...

Re: "out" and "in out"
"no reliable initial value" means, you cannot rely on the value, but it may have a value. This depends on the parameter passing mechanism, which is _not_ related to the parameter mode (contrary to what many people think). So the parameter mode is there (nearly) solely for the information of the reader. The parameter passing mechanism for all kinds of parameters is defined in the RM. There are parameters passed by copy (in and out), by reference; for some it is explicitly left undefined. In your case, the passing mechanism is by reference, so you get what you get. But don't rely...

what does the "+" and the "-" mean?
I recently read what the "+" and the "-" signs mean for compact discs. Of course, a friend has just asked me and I now forget. I've searched all over the place with no results. Anyone know? TIA! .. -------------------------------------- Mike Richter, were you born with "Scam Artist" emblazoned on your face? -------------------------------------- roscoe james wrote: > > I recently read what the "+" and the "-" signs mean for compact discs. Of > course, a friend h...

why have both "." and "->" ?
I used to remember why c++ needed both ? Could somebody help me here ? For example class A{ f(); }; A* aa; You could do either "aa->f()" or "(*aa).f()". So why does C++ need both operators. Raj "raj" <rajkumar@hotmail.com> schreef in bericht news:d7fee6d0.0406230748.694b966b@posting.google.com... > I used to remember why c++ needed both ? > Could somebody help me here ? > > For example > > class A{ > f(); > }; > > A* aa; > > You could do either "aa->f()" or "(*aa).f()". So why does C++...

"ClientConn", "ClientRate" and "Connect"
Hello. Is a ratecontrol and conncontrol features not work for networks described via connect in access ? For example: -----part of /etc/mail/access----- ClientConn:192.168.1 1 ClientRate:192.168.1 1 Connect:192.168.1 RELAY ----------------------------------- -- Regards, Sergey Sergey wrote: > Is a ratecontrol and conncontrol features not work for networks described via connect in access ? > For example: > ClientConn:192.168.1 1 > ClientRate:192.168.1 1 > Connect:192.168.1 RELAY See cf/README. Connect:cy...

Is there any """Anti Stringizing operator #"""
Hi everybody:D I've a string that contains the name of a class. Some members told that I can use """Stringizing Operator (#)""", but the problem is here, that I have the string, & I want something vice- versa. As we know with """Stringizing Operator (#)""", we can get the stirng name of a class or ... str <--- #ClassA But I want to instantiate a class that I have just it's name as a string. ClassA * clsA = new ??? <--- Str ??? How can I do it? I don't want to use """HardCoding"&qu...

"plot", "imshow" and "quiver"
Hi all. So recently I made the discovery that when use "imshow" command, the YDir parameter under Axis Properties is set to "reverse" by default. To me this seems counter intuitive. Why wouldn't YDir be "normal" by default? When set at "normal" it turns out that my image is actually flipped upside down. On the contrary, when use "quiver" command to plot a vector field, the YDir is set at "normal" by default. Even though this makes more sense to me, because "reversed" YDir is the correct way to display an image (as in "imshow"), the result of "quiver" is that the vector fields this time depict the objects as if they are upside down... So every time I use "quiver" I always add the following line to revert the objects back to its normal orientation... set(gca, 'YDir', 'reverse')... In addition, "plot" uses "normal" setting for YDir. The only issue I have is that I use these commands fairly frequently in my job and sometimes they can get a little bit confusing in terms of display. So I wonder why MATLAB hasn't standardized them so that the objects always get displayed the same way. It's just a comment I have. Thank you. "Clare " <flyingclare@gmail.com> wrote in message news:hefvdk$3md$1@fred.mathworks.com... > Hi all. So recently I made the discovery that when use "imshow" command, > the ...

["a", "b", "c", "d"] to "a, b, c, d"?
I want to process each element of an array, but the last element should be handled special. Here is an example: def p_ary(ary) str = "" ary.each do |elem| str << elem << ", " end str.chomp!(", ") str end so p_ary(["a", "f", "x", "test"]) produces "a, f, x, test". The code works, but isn't there an easier and more general way for this behaviour? martinus On Tue, 06 Apr 2004 04:23:22 -0700, Martin wrote: > I want to process each element of an array, but the last ele...

Web resources about - only get data from "today" until "yesterday" - comp.lang.tcl

Resources last updated: 3/13/2016 7:57:59 PM