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
92 Like 54 Dislike
Previous forums Next forums
Other forums

How to read posted binary data from a mobile device and post it to a web server?
Here is the senario...

I have a mobile device (MD) that posts binary data to a Web Server (WS

Blocking video streaming
Hello everyone,

I post a message here because i didn't find any solution yet.
I just finis

Switch letters in message (basic cryptology)...
I am trying to switch letters around in a message for an application on my site (see here). The prob

upload only text files
hi guys i want to upload only text like like (pdf,note pad and ofiice files) so can any one please t

Syntax error
hi im having a little trobble with this script
-------------------------------------------------

Displaying an image using echo command
I had done a query on my database, one of the fields being an image reference to a directory where a

Login Script Issues
I am using a script I got from http://phpsense.com/php/php-login-script.html in order to allow peopl

why isn't this PHP code working ???
it's suppose to find a name on the database.

<?php

$s = $_POST["lname&

Any meaningful project for a new C++ programmer?
I want to do some meaningful program, so I can help myself to learn

Assume I know the fol

Something like an INI editor or a DelimitedText-Editor
Hi all,

Am very, very, very new to PHP and not sure if I should be posting this to a Javascri

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