in reply to Sorting words, keeping only certain words
If you have them in an array, then all it would seem you would need to do would be:
I thought up about 6 lines of code to do each step, but thought the code (untested and untried) was not so good, so I removed it from being visible....
Update: Sounds like, if you're using grep or a match, you need to look at anchoring the match you're trying to find if it matches beginning with a hyphen by either doing /^\w/ to match beginning with a word character, or /^\-/ to match against a leading dash.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Sorting words, keeping only words that start with a letter and contain only letter characters, and hypens, and end in a letter
by Anonymous Monk on Nov 10, 2002 at 22:45 UTC |