Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: simple regex question

by biohisham (Priest)
on Nov 26, 2010 at 15:49 UTC ( #873888=note: print w/ replies, xml ) Need Help??


in reply to simple regex question

What is the nature of the pattern that you are looking for? is it numerical, alphabetical, alphanumerical, composed of special characters....etc ?

Show an example of what you are trying to accomplish... check perlrequick, perlretut->looking ahead and behind, perlreref can be a useful quick reference too



Excellence is an Endeavor of Persistence. A Year-Old Monk :D .


Comment on Re: simple regex question
Download Code
Re^2: simple regex question
by pipeops (Novice) on Nov 26, 2010 at 19:11 UTC
    Hello! I am trying to get values from an array which was pulled from a file in this format: FILE: test one two three four end And then I would like to assign everything (breakdown by \n)between the word test and end so array1 will be: one two three four open FILE, "testfile" or die "cannot open file! \n"; @array = <FILE> @array1 = @array=~ m/"match anything of word test, but before word end"; I will then need to match up all entries between array and array1 and display entries that match.

      posting same badly formatted question as answer again does not help at all, except to get a downvote :-(

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://873888]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (2)
As of 2014-10-26 06:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (152 votes), past polls