Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: Help with Inspect _src_ replacing all [SPACE]ALPHANUMERIC[SPACE] by space
On 1 Nov, 03:40, "Pete Dashwood" <dashw...@removethis.enternet.co.nz>
wrote:
> "Robert" <n...@e.mail> wrote in message
>
>  news:6c8ii3t6r3qr5uhed8mkts2bnamllk8oj4@
4ax.com...
>
>
>
>
> 
> 
> 
> 
> 
> 
>
> An imaginative solution, Robert.
>
> I still prefer:
>
> RegEx.Replace(inputString, @"\s\w+\s", " ") ;
>
> ... which does exactly what the user requested (same as the above), with a
> single statement.
>
> The parameters to the "Replace" function are in 3 parts:
>
> 1. The input string.
> 2. The Regular Expression to be matched.
> 3. The string to replace whatever is matched. (This does NOT have to be th
e
> same length as what is matched; it can be longer or shorter.)
>
> "Translation":
> @ = what follows is a "verbatim string"; it doesn't need to have slashes
> escaped. This is a C# feature, not part of RegEx.
> \s = match a single white space
> \w =  match a single alphanumeric character (the "w" stands for "word")
> + = there MUST be 1, and CAN be many, of the preceding character.
>
> Lastly, the statement specifies that anything found to match, is to be
> replaced by a single space character.
>
> So, ' x '  would match, ' x'   would not;  ' xxxcv13ed5 ' would match, '
> xxxcv$3ed5 ' would not, and so on...
>
> Pete.
> --
> "I used to write COBOL...now I can do anything."- Hide quoted text -
>
> - Show quoted text -

You both failed the GOOD PROGRAMMERS test as neither of you put
appropriate comments in with your code.  :-P


Report this thread to moderator Post Follow-up to this message
Old Post
Alistair
11-01-07 12:55 PM


Re: Help with Inspect _src_ replacing all [SPACE]ALPHANUMERIC[SPACE] by space

"Alistair" <alistair@ld50macca.demon.co.uk> wrote in message
news:1193919592.787611.131630@z9g2000hsf.googlegroups.com...
> On 1 Nov, 03:40, "Pete Dashwood" <dashw...@removethis.enternet.co.nz>
> wrote: 
>
> You both failed the GOOD PROGRAMMERS test as neither of you put
> appropriate comments in with your code.  :-P
>

Do you comment every MOVE statement you write in COBOL?

To a C# or ORACLE Programmer the forms used are as clear as a MOVE statement
would be to a COBOL Programmer.

If you "know the language" then documentation needs to be done at a
CONCEPTUAL level, not at the nitty gritty level. In fact documenting at too
low a level simpy makes your code verbose and difficult to read.

And who told you that GOOD PROGRAMMERS put "appropriate comments" in with
their code? GOOD PROGRAMMERS write code that speaks for itself to another
programmer, and document only the tricky or unusal stuff. Production code is
not intended to be a tutorial for people who are not qualified to maintain
it, or haven't earned the language in use.

Pete.
--
"I used to write COBOL...now I can do anything."




Report this thread to moderator Post Follow-up to this message
Old Post
Pete Dashwood
11-01-07 11:55 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Cobol archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 08:10 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.