Data & text · ALIAS
re
Alias for regex. Regular-expression helpers.
re is an alias of regex and shares the same API.
Quick start
use re
email = "hello@example.com"
say re.search "@" email
say re.replace "example" email "se"API reference
re.match pattern textCheck whether all Text matches a regex.
檢查是否 all Text matches a regex.
re.search pattern textSearch Text with a regex.
Search Text with a regex.
re.replace pattern text replacementRegex replacement.
Regex replacement.
re.split pattern textSplit Text with a regex.
Split Text with a regex.