Important notice about the future of Stripcreator (Updated: May 2nd, 2023)

stripcreator forums
Jump to:

Stripcreator » System Notices » Brad: 1 | Regular Expressions: 0

Author

Message

Brad
Feature Creep

Member Rated:

So I bought a book on Perl the other day which had a large chapter on regular expressions (these are crazy programming things that make text go). I'd been wanting to learn how to use them for a long time rather than hacking my way stupidly through my occasional uses of them like an idiot.

With the help of "Perl For Dummies" and many online resources, I seem to have achieved that dream by stamping out a dumb bug that had been nagging at me for the past six months or so. Here is what I spent my morning making:

[font=courier]$text = preg_replace("|\[comic\](\d+)\[/comic\]|e", "returncomic(\\1)", $text);[/font]

Seriously. All morning.

This fixes the only-one-comic-per-message bug.

You can now post multiple comics in posts in the forums. Observe:

This is comic 100:

[Click to view comic: 'Relationship Troubles']

This is comic 200:

[Click to view comic: 'dolly meets pete']

This is comic 1500:

[Click to view comic: 'Curious Jane 2']

As with everything I ever add to this site, I'm a little wary of this getting abused. I think it could be very fun and helpful for people who use it nicely, but it could easily turn into a comic spam-fest which may annoy people and waste bandwidth at the time.

For now I'll be all trusting and naive and stuff and hope it doesn't get abused, but I can easily put limits in if it's required. Over and out.

---
www.bradsucks.net

10-15-01 2:06pm (new)
quote : comics : pm : info


andydougan
Film critic subordinaire

Member Rated:

Wow! I'd say the forum is pretty much perfect now.

I must see this for myself!

[Click to view comic: 'I know she's meant to be Oriental, but she'll have to do']

[Click to view comic: 'C'mon Daisy, don't drown me this time']

Huzzah!

The only problem now, as you say, is that some people might display their entire collections in the one post. That'd get old fast.

10-15-01 2:18pm (new)
quote : comics : pm : info


habnem
optical delusion

Member Rated:

...that'd only get *really* old if you reloaded with comics--now you'll just have to look at the whole page before you reload it...

---
- christ@myself.com - fuck a cat, kill yourself - my alter ego has five stars

10-16-01 1:11am (new)
quote : comics : pm : info


andydougan
Film critic subordinaire

Member Rated:

I've set my account to show the comics by default, though.

10-16-01 5:29am (new)
quote : comics : pm : info


gabe_billings
President and CEO of Wirthlingsux Inc.

Member Rated:

Can I make a post with all 30,000+ comics in it?

---
100 pounds of shit in a 25 pound sack.

10-18-01 5:59pm (new)
quote : comics : pm : info


andydougan
Film critic subordinaire

Member Rated:

I doubt even you would not have the geekish stamina. But if you succeed in doing this thing, I'll let you sleep with any of my cats.

10-18-01 6:41pm (new)
quote : comics : pm : info

Invalid query