panel icon indicating copy to clipboard operation
panel copied to clipboard

Alternative to the `alternative` match expression for Regular Expressions

Open thakyZ opened this issue 2 years ago • 2 comments

Is there an existing feature request for this?

  • [X] I have searched the existing issues before opening this feature request.

Describe the feature you would like to see.

I know that the pipe character (|) doesn't work but is there some sort of alternative for the alternative match, and if not would it be possible to add an alternative so that the alternative match can be used?

Describe the solution you'd like.

I was thinking of using another character such as %, @, !, &, or just escape the | character outright by writing \u00fc in the box explicitly, if you have to have a double escape such as \\u00fc that could work too.

Additional context to this request.

Since the rules have pipe character separating the rule definitions having an alternative character to the alternative match, would be very helpful to having regex strings.

thakyZ avatar Dec 06 '23 21:12 thakyZ

Assuming you talk about regex in startup variable rules: You can use ;; as separator for the rules, see https://github.com/pterodactyl/panel/issues/1960#issuecomment-625613274. However, there is currently a bug when using ;;, see https://github.com/pterodactyl/panel/issues/4360.

Boy132 avatar Dec 07 '23 07:12 Boy132

Thank you, this does work. However, I can see there also being a problem with if you need ;; in the regex for some reason. I do not know what program or game would need syntax like that, but I am sure some day someone will bring that up. Either way, I will follow the bug report on the issue you linked.

thakyZ avatar Dec 16 '23 16:12 thakyZ