wren,

You need to get a book on regex's. Perl.com has the best available, "Mastering Regular Expressions" is what you want.

Sounds like a formidable task though. For some additional help with your regex you can play with a tool posted on the "perlhelp.com" web site. Go to "Resources" and look for the "Regular Expression Explanation Generator".

Kindest Regards,

Bill Stephenson

On Jan 22, 2004, at 8:21 PM, wren argetlahm wrote:

I'm working on a linguistic module and I'm trying to
find a good way to split a string up into "segments".
I can't assume single charecter strings and want to
assume maximal segments. As an example, the word
"church" would be rendered as the list ('ch', 'u',
'r', 'ch') and wouldn't break the "ch" up smaller even
though both "c" and "h" are valid segments in English.
I have all the valid segments for a given language
stored as keys in a hash, now I just need an algorithm
to chop up a string into a list. Any ideas?

~wren

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/





Reply via email to