Closed Thread Icon

Topic awaiting preservation: Regex in PHP :) (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=12842" title="Pages that link to Topic awaiting preservation: Regex in PHP :) (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: Regex in PHP :) <span class="small">(Page 1 of 1)</span>\

 
Synthetic
Paranoid (IV) Inmate

From: under your rug,
Insane since: Jul 2001

posted posted 08-01-2003 07:59

Trying to learn this regex stuff for some php projects, there any good tutorials out there on the subject, i browsed google but i guess i'm just not being quite direct enough or there isn't much ou there for newbies to the stuff...

Anyway at the moment i'd like to know how to use it to check for a . in a variable, but would still like a few good links if anyone has some

Synthetic's Chess Player Page

Petskull
Maniac (V) Mad Scientist

From: 127 Halcyon Road, Marenia, Atlantis
Insane since: Aug 2000

posted posted 08-01-2003 08:56

here's some Perl-

if ($myVar =~ m/\./g){
}


Code - CGI - links - DHTML - Javascript - Perl - programming - Magic - http://www.twistedport.com
ICQ: 67751342

Rhino
Bipolar (III) Inmate

From: New Jersey, USA
Insane since: Jul 2003

posted posted 08-01-2003 09:19

Here is a tutorial for Perl Compatible Regular Expressions with PHP.
http://www.zend.com/zend/tut/tutorial-delin2.php


Hope this helps

DmS
Paranoid (IV) Inmate

From: Sthlm, Sweden
Insane since: Oct 2000

posted posted 08-01-2003 10:29

Whenever I need regexp I use this to experiment : http://www.quanetic.com/regex.php
It's an online resource where you can test both preg & ereg

Works for me
/Dan

{cell 260}
-{ a vibration is a movement that doesn't know which way to go }-

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 08-01-2003 16:31

PHP comes with a very nice documentation...

Regex pattern syntax: http://www.php.net/manual/en/pcre.pattern.syntax.php
Regex pattern modifiers: http://www.php.net/manual/en/pcre.pattern.modifiers.php


Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 08-01-2003 18:22

See:

:FAQ: Can you help me understand regular expressions?

___________________
Emps

FAQs: Emperor

Lurch
Paranoid (IV) Inmate

From: Behind the Wheel
Insane since: Jan 2002

posted posted 08-01-2003 18:22

oooh.. thanks for the link DmS

regular expressions are something I've always understood, I can just never quite wrap my head around them when the time comes to use them. I can understand each expression, but start throwing them together so you can use them and I get lost quick


Synthetic
Paranoid (IV) Inmate

From: under your rug,
Insane since: Jul 2001

posted posted 08-04-2003 23:57

Thanks everyone, most helpful

Synthetic's Chess Player Page

« BackwardsOnwards »

Show Forum Drop Down Menu