@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet


Comments:

<0> hello anybody can help me
<0> i need to grab information from file through pattern matching
<1> so do we all, sohnaeo. so do we all
<1> If you need help just ask your question. Do not ask to ask or ask if we are around.
<0> hmm thanks
<1> thank the topic
<0> actually i have one file and i want to grab particular information
<1> that's swell



<1> background information isn't relevant quite yet though
<0> one paragraph starts from New Elements
<0> ------------
<0> and last paragraph is
<0> GROUP ***IGNMENT DETAILS
<0> so i want to grab all lines between these 2 paragraphs
<1> <0> so i want to grab all lines between these 2 paragraphs <-- bingo, a question (well, almost)
<0> cai send you mu file and u can have a look
<0> ?
<1> no
<1> pastebin
<0> it is big file
<0> SCHEDULED DISCOVER RESULTS
<0> ==========================
<0> 13/04/2006 13:33:32
<0> Host: EHEALTH01-SYD
<0> Discover Methods: lanWan, routerSwitch
<1> what an idiot :(
<1> do you know what "pastebin" means?
<0> no
<0> sorry for that
<1> then look it up or ask
<0> what is pastebin
<1> google :)
<1> your regexp will need to find the first target paragraph, find the end of that paragraph, then match until the second target paragraph
<1> how do paragraphs end?
<1> e.g. newline? double newline? newline and tab?
<0> it is newline
<1> so you want to find "New Elements", the newline after that, then match everything until a newline followed by the least number of characters until "GROUP ***IGNMENT DETAILS"
<0> yup
<0> honestly i want to grab all devices name



<0> like cgw01.dub01.nsw.sptel.net.au-RH-power-AstecDCPowerSupply-2
<0> all the devices name under New Elements
<1> ($matched_text) = $text =~ /New Elements.*?\n(.*)\n.*?GROUP ***IGNMENT DETAILS/;
<1> you haven't pastebinned yet
<0> but rememeber that these devices can be changed
<1> so i don't know what you're talking about
<0> did u check my file contents under New Elements there are devices list
<0> New Elements
<0> ------------
<0> cgw01.dub01.nsw.sptel.net.au-POS1/0-Path (171)
<0> Action: Resolved New (not saved)
<0> sysName: cgw01.dub01.nsw.sptel.net.au
<0> IP Address: 202.168.55.185
<0> Index1: 9
<0> ifDescr: POS1/0
<0> like that i want to capture cgw01.dub01.nsw.sptel.net.au-POS1/0-Path
<0> these devices name
<0> did u get that?
<0> but remember that these devices name could be changed
<0> if i simple do that $_ =~ /cgw01/
<1> firstly, you didn't use pastebin. secondly, you gave me the wrong problem (you said you wanted to find all the text between two paragraphs, and now you want device names)
<1> you've wasted enough of my time, goodbye
<0> its fine but everytime devices are changing
<0> sorry for that
<0> its my first time on this forum
<0> dont disappoint me
<0> i could not explain my problem
<0> my fault
<0> there?
<0> i am so stupid i admit
<0> ok dont give me answer but dont be angry
<0> ($matched_text) = $text =~ /New Elements.*?\n(.*)\n.*?GROUP ***IGNMENT DETAILS/; is not wokring at all
<2> I'm looking for a good beginner's guide to perl online (I'm planning on getting an ORA book or two in the very near future)... anyone got any links (perl.org's stuff seems a little advanced for someone looking to write his first script)
<1> i can only recommend the offline book Learning Perl (ORA.) mucho goodo
<2> I keep hearing that. I can get to a book store tomorrow (if they're open)... but that doesn't help me now. :/
<3> hey i need a simple CGI script that logs what ever input is given to it throught front page


Name:

Comments:

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






Return to #perl
or
Go to some related logs:

end of fashion oh yeah mp3 free
lebnon chat
#kl
what rhymes with truth
#allnitecafe
abım
#india
janiz 89
#india
#india



Home  |  disclaimer  |  contact  |  submit quotes