in reply to Re: Avoiding code tag considerations
in thread Avoiding code tag considerations

I like the sentiment of the idea, but I wouldn't be surprised if we ended up with nearly as many posts like the one below (which subsequently get considered to move the code into the template*). xdg's suggestion to make recommended tags more prominent could help but certainly wouldn't solve the problem. I suspect diligence, patience, and gentle reminders to new users will continue to be required.

*Update: Then again, it might be possible to automatically remove empty templated code blocks after hitting the Preview button, since the text (if left unmodified) would be easy to identify. That would prevent considerations for superfluous template but would not solve the original problem of missing code tags.

Example post:

I want to use a regex to find all of the 2 digit numbers in a string like 'abc1cdef23gh456ijl78mn' but I can't get it to work. All of the digits are returned one at a time, but I only want the numbers that contain 2 digits (like 23 and 78). Can you help me? Here is my code: my $string = 'abc1cdef23gh456ijl78mn'; while( $string =~ m/(\d)/g ) { print "found $1\n"; }

Any code goes here