79462643

Date: 2025-02-24 06:56:46
Score: 0.5
Natty:
Report link

It is best not to use bare \n or \r in regex patterns. Instead, use \s* or \s+ with multi-line flags for better compatibility.

const match = new RegExp(
  String.raw`#\s*{$name}\s+([\s\S]+?)\s*#\s+osd`,
  "gm"
).exec(code);

For detailed explanation, see here


#\s*master\s+([^#]+)#\s+osd may be also possible; see here.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: aaa