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

Help With editting and deleting form
Hallo !!

So look at this image :

http://img194.imageshack.us/img194/8272/snapshot5f.pn

unserialize help, getting errors
hi all ,
I got a form with 6 fields (2 input and 4 select box), when the page loads one block is

Can't find a decent web analytics!!!
I've downloaded and installed Piwik. It's location detection based on IP addresses is fairly inaccur

Embedding flash object in Else statement
This is my first major project in PHP and I'm having some trouble embedding a flash object in an Els

Table sorting
Hi,

I'm trying to modify the following in order to make the output table sorted alphabeticall

problem with array - multilingual page
this is my test page :
Code: <?php
if(isset($_GET['lang'])) {
if($_GET['la

Pass sql into pl/sql and create RMAN duplicate script.
Hi,

I'm new to pl/sql and I'm trying to write a script that will generate some RMAN comma

rename the file
File.txt

Code: ***DOCUMENT***
..DN:
000044255
..CB:
..SN:
..PY:
2009
..E

how do i make new line after *
First check this page here. and you see my report. Im pulling form a mysql db. I want to beable to m

compile php5 with DOM
Hi,

I can't manage to compile php 5.3.0 from source on Windows to include DOM,
in spite of

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