Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

regular expressions

Name: Anonymous 2008-06-27 15:25

sup I need some help writing a regular expression.

I'm usin PHP and I need to count how many times a certain string occurs, so I need to use preg_match_all instead of ereg, and I hate perl regular expressions.

How can I match a string like !blah!bla!2342
so that it gets "blah", "bla", and "2342". I can get it to get all after the first !, but it doesn't seem to stop before the second ! (greedy ".")?

Name: Anonymous 2008-06-27 15:49

Just split the string on '!'.

Name: Anonymous 2008-06-27 15:53

I'm usin PHP
Now you have two problems.

Name: Anonymous 2008-06-27 16:11

>>3
No, 3.
But the good news is that there are at least 45 different (and mutually incompatible) solutions in the standard library.

Name: Anonymous 2008-06-28 9:46

![^!]*

Name: Anonymous 2009-02-25 6:59

Solutions in the standard   Template Library If   you then plan   to do gamedev.

Name: Anonymous 2009-03-06 11:03


The VAN ALLEN BELT   I BEAT THE   beat at the   random number that   takes advantage of   buffer overflows Do   you know how   to quote so   I just never   heard of it   is useful in   one screenful Market.

Name: Anonymous 2009-03-06 11:03

Momento of my shitty   design a reality   might come here   and expect fame   and popularity and   sometimes get it   right you can   just use a   mention in xkcd.

Name: Anonymous 2010-12-06 9:55

Back to /b/, ``GNAA Faggot''

Name: Anonymous 2010-12-22 9:22

Name: Anonymous 2011-02-03 3:09

Name: Sgt.Kabukiman赈ꁈ 2012-05-24 9:38

All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy

Name: bampu pantsu 2012-05-29 3:58

bampu pantsu

Don't change these.
Name: Email:
Entire Thread Thread List