Regular Expressions 101

Community Patterns

Godot REPL Plugin - (String Literal) Load Expression

0

Regular Expression
ECMAScript (JavaScript)

/
^ *load[(] *(['"])(?<path>(?:[^\n'"]+|.(?<!\1))+)(\1) *[)]
/
gm

Description

Loose matching of load statements, capturing the path parameter in the path capture group.

load('./scene.tscn')
load('path/to/resource.tres')
load("path/to/file.gd")
Submitted by disk0__ - 2 years ago