Arduino 8266 not working with pio 4.3.1

Yeah that special framework version and GCC9 are working perfectly.

Can you try the following platformio.ini:

[env:esp12e]
platform = espressif8266
board = esp12e
framework = arduino
upload_speed = 3000000
monitor_speed = 115200
monitor_port = /dev/cu.SLAB*
upload_port = /dev/cu.SLAB*
build_flags =  -fexceptions  -Teagle.flash.4m1m.ld -std=c++14 
build_unflags = -fno-exceptions -std=c++11
platform_packages = 
	framework-arduinoespressif8266 @ https://github.com/earlephilhower/Arduino.git#gcc9.1
	toolchain-xtensa @ https://github.com/maxgerhardt/xtensa-lx106-elf/raw/master/xtensa-lx106-elf-darwin64-9-2-0.zip

(already adapted for Darwin x64 targets)

with the code

#include <Arduino.h>
#include <string>
#include <regex>

void setup()
{

  Serial.begin(115200);
  Serial.println("Hello world!");
  Serial.flush();

  delay(1000);

  std::regex rgx("^(.*)\\.(htm|html)");

  std::smatch matches;

  std::string url = "/index.html";

  Serial.println("Before regex_search()");
  Serial.flush();
  delay(1000);

  bool res = std::regex_search(url, matches, rgx);

  Serial.printf("\n\nmatch = %d search=%d, results=%d\n", res? 1: 0, res, matches.size());
}

void loop()
{
  delay(10000);
}

should produce

match = 1 search=1, results=3<\n>
Hello world!
Before regex_search()


match = 1 search=1, results=3