Use [[:blank:]] instead of \s for leading space matching in restore.
This is more accurate since we don't really want lf/cr anyway, though the lines have already been split so that's not possible in this code for lf.
Found on MacOS M1. FreeBSD also seems to be fine with the new expression.
@@ -1556,9 +1556,9 @@ restoreRecoveryWriteAutoConf(unsigned int pgVersion, const String *restoreLabel)
RegExp *recoveryExp =
regExpNew(
STRDEF(
- "^\\s*(" RECOVERY_TARGET "|" RECOVERY_TARGET_ACTION "|" RECOVERY_TARGET_INCLUSIVE "|" RECOVERY_TARGET_LSN
- "|" RECOVERY_TARGET_NAME "|" RECOVERY_TARGET_TIME "|" RECOVERY_TARGET_TIMELINE "|" RECOVERY_TARGET_XID
- ")\\s*="));
+ "^[[:blank:]]*(" RECOVERY_TARGET "|" RECOVERY_TARGET_ACTION "|" RECOVERY_TARGET_INCLUSIVE "|"
+ RECOVERY_TARGET_LSN "|" RECOVERY_TARGET_NAME "|" RECOVERY_TARGET_TIME "|" RECOVERY_TARGET_TIMELINE "|"
+ RECOVERY_TARGET_XID ")[[:blank:]]*="));
// Check each line for recovery settings
const StringList *contentList = strLstNewSplit(strNewBuf(autoConf), LF_STR);
