Needing some regexp help.

edited September 2018 in Style Development [?]
I want to create a style for Google Mail's mobile interface. This normally would not be a big deal if it were not for the fact this address changes every single time.

So right, the address I've been going to is This loads a simplified UI I'd like to adjust except every time it resolves to a unique URL, like this;

Worse still, before -/? the code can either be twelve or thirteen digits long.

What do I put in as the regexp I am trying to effect?!


  • This should do it: https?:\/\/(m\.gmail|mail\.google)\.com(\/.*)?

    If you want to learn and/or play with regexp, this is really a great tool. It also links to your specific regexp.

  • I think your version @Vednoc also targets the normal desktop version, not only mobile.

    As I don't have a test account here, it would be good if you gave us at least three links that should be targeted (the ones google redirects you to) and three that should not be targeted (desktop version) so we might figure out if there is a consistent scheme to distinguish them.
  • edited September 2018 [?] = mobile chrome /firefox

    555 possible is random.

  • @krystian3w That looks different from the url OP wrote in his first post.

    Just to be clear, if you want to design a mobile style on your desktop pc, you probably have to change your UserAgent and window size, otherwise google will know you're on a desktop PC and probably redirect you to a desktop page.
  • edited September 2018 [?]

    As for me, changing the user agent only is enough and I do not have to tilt the window / use responsive mode (Ctrl + Shift + M).

Sign In or Register to comment.