diff options
Diffstat (limited to 'demos/misc/regex/regex.gd')
-rw-r--r-- | demos/misc/regex/regex.gd | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/demos/misc/regex/regex.gd b/demos/misc/regex/regex.gd deleted file mode 100644 index 98e5ca8828..0000000000 --- a/demos/misc/regex/regex.gd +++ /dev/null @@ -1,28 +0,0 @@ - -extends VBoxContainer - -# Member variables -var regex = RegEx.new() - - -func update_expression(text): - regex.compile(text) - update_text() - - -func update_text(): - var text = get_node("Text").get_text() - var list = get_node("List") - for child in list.get_children(): - child.queue_free() - if regex.is_valid(): - regex.find(text) - for res in regex.get_captures(): - var label = Label.new() - label.set_text(res) - list.add_child(label) - - -func _ready(): - get_node("Text").set_text("They asked me \"What's going on \\\"in the manor\\\"?\"") - update_expression(get_node("Expression").get_text()) |