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.

No comments posted yet

Your Answer:

Login to answer
156 Like 17 Dislike
Previous forums Next forums
Other forums

Writing Windows Device Drivers with C
Yes: one of the nice features of C is void*. You can put anything there and get anything out. Very

login form can you find my error?
registrationform.php seems fine send data to registration.php
registration.php seems fine checks

Help with search.php
Hello All

I need the search engine on a site I am building at the moment to display the searc

Table trouble
i have been reading the forum for a few weeks and decided to join. i like the format and the advice

how to read and write into a word document using php...?
hi,
I need,reading and writting into a word document using php.




Thank u inadva

PHP / MySQL Associative Multidimensional Array:
Hello.

I have data in a MySQL Table that adheres to the below: (note, no index, could add if

Rounding a number queried from a database
I know that to display a rounded number you just do echo "round($number)";. But how would

gmdate() - want 1 hr before time
Hi,
I am using php gmdate().
Now I am entering all dates in my dbase using gmdate("Y-m-d

storing results of a function - previous result overwritten with new result
I have created a function to validate input.

function validate_dimension($value,$name) {
<

multipart emiail forms
Hi All,

I am new to the boards and I've been working on a form (which is rather massive, imo

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