What does this # (? - mix: facebook | twitter) mean?

What does the expression # (? - mix: facebook | twitter) mean in the following output from rake routes?

user_omniauth_callback        /users/auth/:action/callback  users/omniauth_callbacks#(?-mix:facebook|twitter)
+5
source share
1 answer

This is a fragment of a regular expression, and it effectively matches either facebookor twitterin this position and is case sensitive (therefore, it will not match facebookeither twitter).

If you want to know more about regular expressions, then start here :)

+4
source

All Articles