How to ask a regex question?


Posted on 16th Feb 2014 07:03 pm by admin

Hi, I thought I'd share some of my insight after seeing too many bad questions that either get ignored, rejected, or misunderstood in this forum. I'm surprised there isn't already any suggestions/guidelines in asking regex questions.

So you got a problem with regex? Great, here's some guidelines on asking:
1. Describe your problem or background that is important to it.
2. Give sample data (the input data, the haystack...etc..)
3. Give the expected output/matches from your sample data.
4. Give the actual output that you have if you've attempted something already.
5. Provide code if necessary, if your problem concerns it.
6. We assume its a php regex related as this is phpfreaks, but you still need to specifiy (if not obvious) if you are talking about POSIX (ereg) or PCRE (preg) flavor.
7. Be patient/grateful and don't demand things. Regex questions may take longer than expected to be answered, they're tougher sometimes.

92 Like 54 Dislike
Previous php-forum Next php-forum
Other php-forum

generating random codes
Hi guys n gals,

I have a requirement to generate 250,000 unique codes...

These codes a

Check if another session of the page is running?
I want to keep people from opening multiple tabs, or sessions of my Facebook app. Is it possible to

How to update this array?
I am saving a string that looks this: username1, username2, username3...
into a single cell in a

Google Map
I have done Google Map Integration for one my project. But for that we need the "latitude and l

Hi, explode and strstr.
Hi, I seem to be confused about the strstr function, eg. i have a string like:
"a.b.c.d.e.f&

Image upload - determine folder
I have an upload script that may be accessed from different directories. Problem is, the script is m

Showing selected item at top of list
Hi,

I've got a list of names which i am fetching from database like this:
$qry = db_query

Passing variables with pagination - iterating through unique id per link
Hi everyone,
I have seen a few topics like this one. Still cant find the specific thing, so I am

Need help adding a timestamp to my filename/variable
Hello,

I'm kind of stupid when it comes to php and I need a tiny bit of help. I've got a f

Upload, SSL and more php help
I recently just installed a ssl cert and do i use https for the whole site or just for the checkout.

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash