Skip to content

regex_syntax::Parser.parse and regex::Regex.build alignment? #937

Answered by BurntSushi
Guillermogsjc asked this question in Q&A
Discussion options

You must be logged in to vote

Sorry, it is very difficult to understand your question.

I think what you're asking is whether Regex::new can fail due to anything except a parse error. Indeed it can! It can fail if the regex exceeds the configured RegexBuilder::size_limit.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Guillermogsjc
Comment options

@BurntSushi
Comment options

Answer selected by BurntSushi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants