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.
Did you know?Explore Trending and Topic pages for more stories like this.
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

Problem with "dynamic" index page
Hi. I have one question. In my index.php page I have this kind of code:
Code: // listaa sivut

Trouble with a select list
Hello All!
I was wondering if any of you guys could help me with a small problem I'm having!

How to generate a random array of integers subject to a certain constraint
I am writing a program that asks the user to enter an integer N and then generates a random array of

Email Script does not reach destination
Hey Guys look at this code snippet :
Code:
//read a line from the file

$myFile = "

Renaming a file that a user uploads to site?
My site allows for registered users to upload images to the site under their own gallery. Currently

file_put_contents and createimagefromjpeg
All,
I do somethings and then I have the following code:
file_put_contents('./test/'.$filename

Help with usergroups? prolly really quick
So were coding our own forums for a game system we made an we have the users level setup but now I n

Why do I get this error?
Error:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or

isset undefined variable
Hi all,

Hope someone can point out the obvious. I've a log in script, if you dont enter a use

AUTONUMBER PROBLEM
Hello Everyone,

My name is Jones and i am new to this forum and to oracle. I am using ora

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