How to detect plurals in English sentences?
Morphological parsing requires a lexicon (stems and their part of speech) , morphotactics (ordering of morpheme classes), and orthographic rules (e.g. fox + PL = foxes rather than foxs).

The preferred approach is to use a composition of finite state transducers to map a surface level representation (e.g., foxes) into its lexical representation (e.g., fox +N +Pl).

For a robust method, you are better off using an existing system like Foma, lttoolbox, or SFST than writing your own system since these systems come with rich morphological data sets.