@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22



Comments:

<0> question for you guys
<1> 12
<2> it's also handy for entering url's and instantly shelling a new browser window
<1> heh
<1> well, os x has that
<1> spotlight
<2> <1> or often times, i drag and drop a file from the desktop into an open window in osx
<1> it's basically a glorified 'locate' command
<2> i dont see where the complication is
<0> Would you do Open Source work that REQUIRES flash/DHTML?
<2> trollboy: flash, no. dhtml, sure
<1> ditto
<1> Two-Bits: hit win+d, click and drag a file, hit win+d (without dropping file) and try and drop it into an app
<1> i don't think it works
<2> evulish: it does
<2> so long as you begin the drag before you win+d again



<1> huh?
<1> ah **** it
<1> i'm going to bed
<2> you can also just hover your drag over the taskbar item to restore that window. which is what i personally do because i usually have everything maximized
<2> why do you ask, tb?
<3> red vs blue rocks
<0> yes it does
<0> STFU donut
<3> i love caboose
<3> when him and serge are back to back, shooting the newbs
<3> and he spells "cabose" by shotting the wall
<0> dude
<0> MCE does rock
<0> I'm watching a recorded show
<0> and guess what
<0> I'll be damned if it didn't record the closed captioning as well
<3> that ****s
<3> i can't help but read them
<3> even when i don't need to
<0> I muted for RVB
<0> its nice for when the boss calls
<3> "i'm sad that i'm flying"
<3> "My name is michael J caboose... and i eat babies!"
<1> i want a video ipod just so i can put all the rvb's on it
<0> In fact, I never poop at the base, only at home
<0> dude, we've been out here for 3 years
<0> yeah
<0> it will be a very eventful homecoming
<0> monster trucks
<0> say
<0> does anyone here know of a fast switching remote desktop client?
<0> to have several remote desktop or vnc clients open at once?
<4> Here's my situation. I'm looking to remove the 'bgColor' attribute from data captured from the internet stored in a file. This is what I have, what would I need to do to get it to replace or remove the bgColor attrib in the tr tag? http://pastebin.com/552279
<5> @preg_replace!
<5> hm
<5> !function preg_replace
<5> ****.
<5> http://www.php.net/preg_replace
<4> $data = preg_replace('| bgColor(.+?)>|i', ">", $data) <-- would that work ?
<5> give it a try
<5> I'm still on a trial-and-error basis with regexp
<5> for the most part
<4> nop..
<4> :\ didn't work
<0> http://barelyevil.com/hc/a12jx/jax_shinyblack054.jpg
<5> hmm
<5> try $data = preg_replace('| bgColor([^>]+)|i', '', $data);
<4> yes
<4> that did it
<5> victory!
<4> :)
<0> no one is commenting on my porn
<0> :-(
<0> do you not love my porn?
<5> that certainly is porn, tb
<0> ...
<0> no oo's or ah's
<4> what exactly does ([^>]+)|i == to ?
<0> you guys ****
<0> eww.. regex



<5> it grabs everything following the bgcolor that is not a >
<5> and replaces it with an empty string
<5> er
<5> everything following the bgcolor up until it encounters a >
<4> yea i know that part. :)
<5> useful for grabbing an entire tag
<4> let me play aroud with it a little bit... :)
<5> Nice to meet you, btw
<5> I'm friends with Evangar.
<4> same here.
<4> thanks for the help.
<5> np
<4> so if i'd want to change the bgColor of a specific color i'd do this: $data = preg_replace('| bgColor=\"#0066cc\"', ' bgColor=\"#FFFFFF\"', $data);
<5> you could do the same thing with str_replace, in that case
<4> so instead of preg_replace it would be str_replace?
<5> if you wanted to change an html color you could do $data = preg_replace('| bgColor=\"#([0-9A-Fa-f]{6})\"', bgColor=\"#FFFFFF\"', $data);
<5> the regexp would match any valid hex color
<5> (I think)
<5> but yeah for straight string replacement str_replace is far preferable
<2> "/\s+bgcolor=(('|\").*?\\2|\S+(?=\s|>)/i"
<4> wow
<4> you completelt lost me two bits.
<4> http://www.youtube.com/p.swf?video_id=kKGxaol4qws&eurl=&iurl=static13.youtube.com/get_still.php?video_id=kKGxaol4qws <--- hahaha check that out
<2> it's untested, but that should account for just about every legal syntax
<5> Two-Bits, you're fired.
<2> more all-purpose than ***uming double quotes are used, or that it's the last attribute in the tag, etc
<4> I was just wondering how i would change the given color of a specific cell to a different color... lets say in the html output its #ffffff i would want ot change it to #000000
<2> simply consider what is being matched, and what you have to replace it with
<2> if you're trying to replace a specific color, then you'd need to use that color in the pattern
<4> i understand that.
<4> but it returns an empty page.
<2> if you want to replace all colors, then the color portion of the attribute can be matched by a pattern
<2> what requires an empty page
<4> $data = preg_replace('| bgColor=\"#000000\"', bgColor=\"#FFFFFF\"', $data);
<4> instead of returning the results with the cell color white it doesn't return anything just a blank page
<2> you're missing your closing |
<5> but really, if regexp isn't involved, you're better off using str_replace
<2> you should probably stick to the normal / delimiter unless you have a reason to deviate
<2> yes, what you have there is not making ANY use of regex. str_replace should always be used when possible
<4> so $data = str_replace('| bgColor=\"#000000\"|', bgColor=\"#FFFFFF\"', $data); would do the job for me ?
<2> also, you're getting a blank page because your page has a fatal error that's not being reported
<2> count your quotes
<5> you don't use the | delimiter with str_replace
<2> and dont use pipes in str_replace
<2> regex uses delimiters within the pattern definition much like quotes are to strings. they signify the start and stop of a regex pattern, and pcre (perl compatible regular expressions) often have the flexibility of changing the delimiters at will to avoid having to escape some characters in the pattern
<4> oh
<4> ok i think i got it.
<4> so no need for pipes with str_replace
<2> str_replace is not regex, so obviously no
<4> therefore my expression would be: $data = str_replace(' bgColor=\"#000000\"', bgColor=\"#FFFFFF\"', $data);
<2> and again, you should use the default / for regex until you understand WHY pipes might be used
<2> and yet again, COUNT YOUR QUOTES
<2> !php $data = str_replace(' bgColor=\"#000000\"', bgColor=\"#FFFFFF\"', $data);
<6> Parse error: syntax error, unexpected '=' in /usr/home/poutine/safe/raw.php(6) : eval()'d code on line 1
<2> stupid bot
<2> there we go
<5> ok
<5> bigtymer-, you're fired
<2> if your error reporting settings were set correctly, you'd have seen that in the browser
<4> well they aren't
<4> :\
<2> obviously
<4> hahaha sorry robdgreat...
<2> check your php.ini and set display_errors to 1, and error_reporting to E_ALL
<4> count my quotes?
<2> YES, COUNT YOUR QUOTES
<4> well im on a server.. shared hosting.. so i don't get to modify that ...
<2> you have an ODD number of single quotes
<5> you can modify that in your script.
<2> ignoring quotes embeded in a string, you should ALWAYS have an EVEN number of quotes, since you will always need a corresponding closing quote for every opening quote
<4> yes
<4> stupid on my part
<4> didn't even realize it...


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #php
or
Go to some related logs:

dah stim
#india
#allnitecafe
Kenot+busty
#india
annkhien
#allnitecafe
#india
kool and the gang mislead mp3
Sonahai



Home  |  disclaimer  |  contact  |  submit quotes