Forums

Regex sample

General discussion about Cobra. Releases and general news will also be posted here.
Feel free to ask questions or just say "Hello".

Re: Regex sample

Postby Charles » Mon Apr 20, 2009 6:24 pm

Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: Regex sample

Postby Charles » Fri May 08, 2009 7:02 pm

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?
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: Regex sample

Postby Caligari » Sun May 10, 2009 7:09 am

I can't think of a reason it could not be so listed.

- Caligari
Caligari
 
Posts: 33

Re: Regex sample

Postby Charles » Fri May 15, 2009 3:37 pm

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.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Previous

Return to Discussion

Who is online

Users browsing this forum: No registered users and 107 guests

cron