Test, validate and match regular expressions
Matches words that end with a trailing apostrophe or hyphen, optionally allowing leading apostrophes/hyphens and internal ones (e.g., contractions like "o'clock" or hyphenated fragments like "well-"). Useful for detecting line-break splits, possessive truncations, or words with trailing punctuation in text processing. Uses global and multiline flags to find all matches across multiple lines.