1

I have to differentiate between an incoming request from an Iphone App and an incoming request from an Iphone/Ipad (apple mobile device) web browser.
As stated in this question Iphone Web Browser vs Iphone Web Agent and for what I have seen in my logs, the difference between both user agents is that when coming from a web browser, the word "Safari" is added at the end. So my question is:

How would I create a regex similar to this one:

/Apple.*Mobile.*Safari/ 

But instead of .*Safari, making sure that Safari is not there. So I know the petition comes from the app.

Community
  • 1
  • 1
Hommer Smith
  • 26,772
  • 56
  • 167
  • 296

1 Answers1

1

You could do it with en expression like:

Apple.*Mobile(?!.*Safari)
Qtax
  • 33,241
  • 9
  • 83
  • 121