tags:

views:

40

answers:

1

Given this output from aspell, how can I can get the spelling suggestions:

@(#) International Ispell Version 3.1.20 (but really Aspell 0.60.6)

& knoledge 12 0: knowledge, knowledge's, pledge, ledge, kludge, sledge, Lodge, lodge, Coolidge, Noelle, knoll, nudge

I cooked-up this regex:

/[a-z\']+(?=,|\z)/i  

but I know it would fail if there's a comma in the first line.

A: 

Something like:

.*:\s+(.*)

would give you the all list in group 1, but you would still need to parse the result to get the individual element of the list.

in a dotall mode (which may not be your case here):

^[^\r\n]*:\s+([^\r\n]*)$
VonC