Abdalla Omran

Abdalla Omran

  • NA
  • 334
  • 32k

How could I split in RegularExpressions ?

Dec 24 2019 7:07 AM
based on this strings i want to split the following
  1. string logEntryLine = "123.45.67.89 - - [27/Oct/2000:09:27:09 -0400] \"GET /java/javaResources.html HTTP/1.0\" 200 10450 \"-\" \"Mozilla/4.6 [en] (X11; U; OpenBSD 2.8 i386; Nav)\"";  
  2.    
  3. string logEntryPattern = "^([\\d.]+) (\\S+) (\\S+) \\[([\\w:/]+\\s[+\\-]\\d{4})\\] \"(.+?)\" (\\d{3}) (\\d+) \"([^\"]+)\" \"([^\"]+)\"";
i want to split GET/ and HTTP/1.0\
 
how could i add them in logEntryPattern?

Answers (1)