Test your regular expression knowledge. how can this problem be solved?

Source: Internet
Author: User
Test your regular expression knowledge 192.168.93.24 '2017-03-2012: 02: 05 'Get/91063b13bf8ba59b896804d829b0ff20/3110/apk/index. php? System = source & amp; modu test your regular expression knowledge
192.168.93.24 '2017-03-31 10:02:05 'GET/91063b13bf8ba59b896804d829b0ff20/2012/apk/index. php? System = source & module = bibei & app = 0 & f = 9_3_0_0_0 'http: // 192.168.93.55: 9090/apk/index. php? App = 0'mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.0 Safari/535.7

There is such a string, note that there is such a string f = 9_3_0_0_0, it may or may not exist, its location is not fixed, just know that it must be behind hello, 'front, to do this, try to match the five digits after f = (not fixed). if there is no f parameter, you can obtain all the values blank. Thank you!

------ Solution --------------------
So?
Preg_match_all ('/\ bf = ([\ d _] +) \ B/M', $ s, $ r );
Print_r ($ r [1]);

Array
(
[0] => 9_3_0_0_0
)

------ Solution --------------------
I have been reading this question for a long time.
PHP code
$ Str = <
  ------ Solution --------------------
Discussion

Update the post:
192.168.93.24 '2017-03-31 10:02:05 'GET/91063b13bf8ba59b896804d829b0ff20/2012/apk/index. php? System = albums & module = list & app = 0 'http: // 192.168.93.55: 9090/apk/index. php? Syste
M = source &......
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.