LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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-12-2002, 12:46 PM   #1
markus1982
Senior Member
 
Registered: Aug 2002
Location: Stuttgart (Germany)
Distribution: Debian/GNU Linux
Posts: 1,467

Rep: Reputation: 46
using a perl regular expression in php


(problem solved, was just missing a ".")

Last edited by markus1982; 11-12-2002 at 01:03 PM.
 
Old 11-15-2002, 02:50 PM   #2
Syncrm
Member
 
Registered: Aug 2001
Location: Lansing, Michigan
Distribution: slackware8+
Posts: 472

Rep: Reputation: 30
not to really complain... but i was interested in reading the problem/solution.

so could you please keep both in the thread? that way other people can learn from your experience. :-)
 
Old 11-16-2002, 04:43 AM   #3
markus1982
Senior Member
 
Registered: Aug 2002
Location: Stuttgart (Germany)
Distribution: Debian/GNU Linux
Posts: 1,467

Original Poster
Rep: Reputation: 46
Normally would have done that but it was just a typo, I rechecked the whole thing and found the typo so ... guess you should never code when being to tired
 
Old 11-16-2002, 10:00 AM   #4
amp2000
Member
 
Registered: Oct 2001
Location: Dublin, Ireland
Distribution: Mandrake 9.0 mostly!
Posts: 303

Rep: Reputation: 30
If it's not too much trouble can you stick the code you removed back in, I'd be interested to see how to use a perl regular expression within PHP

Cheers
amp2000
 
Old 11-18-2002, 11:12 AM   #5
Syncrm
Member
 
Registered: Aug 2001
Location: Lansing, Michigan
Distribution: slackware8+
Posts: 472

Rep: Reputation: 30
Quote:
Originally posted by amp2000
If it's not too much trouble can you stick the code you removed back in, I'd be interested to see how to use a perl regular expression within PHP;)
yes, please do. i'm a perl hacker, and do a little php when necessary, and would like to know how regexes work in php. :-)

on a completely separate note, i have 420 posts! omg weeeeee! ;-)
 
Old 11-18-2002, 02:31 PM   #6
markus1982
Senior Member
 
Registered: Aug 2002
Location: Stuttgart (Germany)
Distribution: Debian/GNU Linux
Posts: 1,467

Original Poster
Rep: Reputation: 46
Since you are interested in it well the code ...
Code:
preg_match("/^SNMPv2-SMI::enterprises\.9\.2\.4\.9\.1\.4\
.(\d+\.\d+\.\d+\.\d+)\.(\d+\.\d+\.\d+\.\d+) = INTEGER: (\d+)$/", $line, $temp_data);
Just a little bit of SNMP parsing is coming afterwards ...
 
  


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 regular expression problem true_atlantis Programming 4 05-27-2009 06:35 AM
Perl regular expression issue zikhermm Programming 7 09-23-2005 03:48 PM
Having trouble with a perl regular expression... jayemef Programming 3 08-25-2005 11:00 PM
Perl Regular Expression dilemma GATTACA Programming 1 03-27-2004 07:48 PM
Perl Regular Expression rch Programming 14 07-11-2003 11:00 PM

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

All times are GMT -5. The time now is 03:09 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