Everyone has his/her own reasons for doing it, but I might offer one suggestion. You stated a problem that you had, with the limitation that it needed to be done with regex. You didn't explain *why* it had to be that way, which might have helped your credibility. But the most serious problem, IMNSHO, is that you didn't show anything about how you tried to solve it yourself.
You probably should check out How (Not) To Ask A Question. An important step in asking a question is showing what you've already tried, posting the code that didn't work. If you're so blocked you can't even think of where to start, then post some information about where you looked for answers. People want to see that you've made some effort to answer the question yourself, instead of just asking someone else without even trying.
Personally, when I see a limitation like, "it has to be a regex", it sets my spider senses tingling. One, it sounds very much like homework. Two, it suggests that the problem may be the restriction itself. If you had posted some explanation about why it had to be a regex, it might have helped your credibility a bit. Example: "My PHB only knows about regexen, so I have to do it that way".
Finally, yes, the votes you get on your questions do affect your XP. XP is a measure of how well liked your posts are, basically. It's a way of encouraging people to post well-considered questions in a helpful way. It encourages people to come to the Monastery and try to learn Perl, and try to help others with their questions. Now you see that a certain way of doing things doesn't get many up-votes. Your XP was affected, so you're trying to figure out how to avoid the mistakes that caused that. The incentive is working. But if you were to get 10 million XP points, would you be any better as a programmer?
Are you posting in the right place? Check out Where do I post X? to know for sure.
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
Want more info? How to link or
or How to display code and escape characters
are good places to start.