Regex for new Project

Hello,

the new project specification states that:

You must not use parts of the Java standard library that parse URIs/URLs, neither direct nor indirect. In particular, using the java.net library is not allowed for this project.

Is java.util.regex.Pattern (link) allowed?

Also there is no URI category yet for the forum. :slightly_smiling_face:

1 Like

Indeed, that is allowed. Some tutors even would encourage it.

4 Likes

Would (in theory) writing one huge regex pattern that does the whole parsing for us be valid?

1 Like

Yes. Good luck! You will need it.

3 Likes

That would be a nightmare to maintain, but you probably know that :smile:

Also while in this case it might be possible it is in general not possible to parse arbitrary grammars just using regular expressions (or even regex).

Is java.util.regex.Matcher allowed?

1 Like

Yes, java.util.regex and subpackages are allowed.

2 Likes