Regular Expressions 101

Match C/C++ local include

Open Workspace
  • Rust
  • Match
2

Regular Expression

r#"
^#include[\t ]*"((?:/?[\w\-. ]+)+\.(?:hpp|h))"[\t ]*$
"#
gmu

Description

Match C/C++ local include and have the path in group 1

Submitted by Anonymous