https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88947
--- Comment #3 from Tim Shen <timshen at gcc dot gnu.org> --- Thanks for reporting Tomalak. Yes, I agree that "match from the first character" should be expressable in the public interface, preferrably regex_search() with "^...". In fact, internally regex_search is implemented in terms of such semantic. As for other forms like "(^...)", or "(^abc|^xyz)", I'm sure we can go down the rabbit hole and support more of them, but IMO the gain is marginal if "^..." is supported.