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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
11-12-2002, 01:46 PM
|
#1
|
Senior Member
Registered: Aug 2002
Location: Stuttgart (Germany)
Distribution: Debian/GNU Linux
Posts: 1,467
Rep:
|
using a perl regular expression in php
(problem solved, was just missing a ".")
Last edited by markus1982; 11-12-2002 at 02:03 PM.
|
|
|
11-15-2002, 03:50 PM
|
#2
|
Member
Registered: Aug 2001
Location: Lansing, Michigan
Distribution: slackware8+
Posts: 472
Rep:
|
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. :-)
|
|
|
11-16-2002, 05:43 AM
|
#3
|
Senior Member
Registered: Aug 2002
Location: Stuttgart (Germany)
Distribution: Debian/GNU Linux
Posts: 1,467
Original Poster
Rep:
|
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
|
|
|
11-16-2002, 11:00 AM
|
#4
|
Member
Registered: Oct 2001
Location: Dublin, Ireland
Distribution: Mandrake 9.0 mostly!
Posts: 303
Rep:
|
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
|
|
|
11-18-2002, 12:12 PM
|
#5
|
Member
Registered: Aug 2001
Location: Lansing, Michigan
Distribution: slackware8+
Posts: 472
Rep:
|
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! ;-)
|
|
|
11-18-2002, 03:31 PM
|
#6
|
Senior Member
Registered: Aug 2002
Location: Stuttgart (Germany)
Distribution: Debian/GNU Linux
Posts: 1,467
Original Poster
Rep:
|
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 ...
|
|
|
All times are GMT -5. The time now is 01:29 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|