>The drawback i see in wordnum is that it ignores repetition of delimiter, for example:
>
>
? wordnum('aas,bbb,ccc', 2, ',') --> bbb
>
? wordnum('aas,,bbb,ccc', 2, ',') --> bbb
>
>I would expect to receive the empty string as a result of the second function call.
>
>Hugo
The reason is simple: WordNum() counts words, not parameters! WordNum() is designed, by default, to eliminate all white space: not only spaces, but also tabs and carriage returns. Thus, it is not specifically designed to extract parameters.
Since this is not what either you or I need, I think it is preferable to write your own extraction function, or, for a quick-and-dirty solution, to replace commas with carriage returns, and use either mline() + mlines() + _mline, or alines().
Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)