![]() |
Fun 0.41.5
The programming language that makes you have fun!
|
VM opcode snippet for OP_REGEX_MATCH (POSIX full-match). More...
Go to the source code of this file.
Functions | |
| if (str.type !=VAL_STRING||pattern.type !=VAL_STRING) | |
| free_value (pattern) | |
| free_value (str) | |
| push_value (vm, make_int(truth)) | |
Variables | |
| case | OP_REGEX_MATCH |
| Value | str = pop_value(vm) |
| int | truth = 0 |
| break | |
VM opcode snippet for OP_REGEX_MATCH (POSIX full-match).
This opcode checks whether a regular expression pattern matches the entire input string. It uses POSIX regex APIs on UNIX platforms and provides a graceful fallback elsewhere.
Behavior (stack effects):
Platform notes:
Errors:
Example:
Definition in file regex_match.c.
| free_value | ( | pattern | ) |
| free_value | ( | str | ) |
| if | ( | str.type ! | = VAL_STRING || pattern.type != VAL_STRING | ) |
Definition at line 43 of file regex_match.c.
| break |
Definition at line 53 of file regex_match.c.
| case OP_REGEX_MATCH |
Definition at line 40 of file regex_match.c.
Definition at line 42 of file regex_match.c.
| int truth = 0 |
Definition at line 50 of file regex_match.c.