LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-06-2006, 08:02 PM   #1
ShaqDiesel
Member
 
Registered: Jul 2005
Posts: 144

Rep: Reputation: 15
Perl global matching


For each substring that matches a regex on a given line, I want to call a subroutine on that matching substring. Since I am matching in a list context with a regex that has groups, each iteration returns a group from the last substring that matched the regex. How do I return the matching substring each iteration? Thanks.
 
Old 11-07-2006, 08:54 PM   #2
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,248
Blog Entries: 8

Rep: Reputation: 235Reputation: 235Reputation: 235
Hello ShaqDiesel. Your description is kind of complicated. Please explain it to us in a simpler manner. Or perhaps if you already have a script, you can also post it. Tnx.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Perl pattern matching in VB rigel_kent Programming 1 05-30-2006 11:00 AM
Perl Pattern Matching Question pete1234 Programming 2 08-27-2005 10:26 AM
perl regex matching exodist Programming 2 11-15-2004 10:50 PM
perl matching *-length strs towlie Programming 2 07-21-2004 08:13 PM
pattern matching in perl ludeKing Programming 9 04-02-2004 09:53 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration