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?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||