Regex to get spelling suggestions from aspell

Given this output from aspell, how can I 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 prepared this regex:

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

      

but I know it will fail if there is a comma on the first line.

+2


a source to share


1 answer


Sort of:

.*:\s+(.*)

      

will give you the entire list in group 1, but you still need to parse the result to get a single list item.



in point mode (it might not be the case):

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

      

0


a source







All Articles