Skip to content

Commit 7eba424

Browse files
author
梶塚太智
committed
Update main.rs
1 parent f203826 commit 7eba424

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,8 @@ impl Executor {
526526
// Search by regular expression
527527
"regex" => {
528528
let pattern = self.pop_stack().get_string();
529+
let text = self.pop_stack().get_string();
530+
529531
let pattern: Regex = match Regex::new(pattern.as_str()) {
530532
Ok(i) => i,
531533
Err(e) => {
@@ -535,8 +537,6 @@ impl Executor {
535537
}
536538
};
537539

538-
let text = self.pop_stack().get_string();
539-
540540
let mut list: Vec<Type> = Vec::new();
541541
for i in pattern.captures_iter(text.as_str()) {
542542
list.push(Type::String(i[0].to_string()))

0 commit comments

Comments
 (0)