Page 2 of 2

Re: Regex sample

PostPosted: Mon Apr 20, 2009 6:24 pm
by Charles

Re: Regex sample

PostPosted: Fri May 08, 2009 7:02 pm
by Charles
Caligari wrote:Here is a possible finished version of the Regular Expression sample I was working on.

It uses the list "concated" method, so will not run for anyone until that is added to Cobra.

If there are any other issues, let me know. I'm happy to revise it further if needed.

- Caligari

Can this go in the Cobra repository (and web site) under the MIT open source license?

Re: Regex sample

PostPosted: Sun May 10, 2009 7:09 am
by Caligari
I can't think of a reason it could not be so listed.

- Caligari

Re: Regex sample

PostPosted: Fri May 15, 2009 3:37 pm
by Charles
I've added FindWords.cobra to the Samples directory in the repository. I made some small improvements:

- Added I/O erorr handling around the *reading* of file content.
- Make use of the "using pattern" for reading files.
- Added a hint to run with -h if there was an I/O error.
- Broke out some of the .main code into further methods which makes .main high level and small.
- Removed "is shared" from everything just to simplify the code.

Otherwise, it's pretty much the same program. I'll post it to the site soon.