< 1 2 3 4 5 6 > >>   Sort: Rank

Capturing referer URL from Apache Web log file
How to capture the referer URL from Apache Web log file? Here are some Apache Web log file entries:127.0.0.1 - frank [10/May/2012:13:55:36 -0700] "GET /apache_pb.gif HTTP/1.0" 200 2326 "-" "-" "-" 213.135.131.79 - - [13/May/2012:17:35:32 -0600] "POST /submit.jsp HTTP/1.0" 200 1024 "-" "-" "SID=1000;...
2013-02-04, 2199👍, 0💬

Capturing user agent from Apache Web log file
How to capture the user agent from Apache Web log file? Here are some Apache Web log file entries:127.0.0.1 - frank [10/May/2012:13:55:36 -0700] "GET /apache_pb.gif HTTP/1.0" 200 2326 "-" "-" "-" 213.135.131.79 - - [13/May/2012:17:35:32 -0600] "POST /submit.jsp HTTP/1.0" 200 1024 "-" "-" "SID=1000;L...
2013-02-04, 2219👍, 0💬

Capturing cookie string from Apache Web log file
How to capture the cookie string from Apache Web log file? Here are some Apache Web log file entries:127.0.0.1 - frank [10/May/2012:13:55:36 -0700] "GET /apache_pb.gif HTTP/1.0" 200 2326 "-" "-" "-" 213.135.131.79 - - [13/May/2012:17:35:32 -0600] "POST /submit.jsp HTTP/1.0" 200 1024 "-" "-" "SID=100...
2013-02-04, 2201👍, 0💬

Capturing authenticated user name from Apache Web log file
How to capture the authenticated user name from Apache Web log file? Here are some Apache Web log file entries:127.0.0.1 - frank [10/May/2012:13:55:36 -0700] "GET /apache_pb.gif HTTP/1.0" 200 2326 "-" "-" "-" 213.135.131.79 - - [15/May/2012:19:21:49 -0400] "GET /features.htm HTTP/1.1" 200 9955 "http...
2013-02-03, 1977👍, 0💬

Capturing timestamp from Apache Web log file
How to capture the timestamp from Apache Web log file? Here are some Apache Web log file entries:127.0.0.1 - frank [10/May/2012:13:55:36 -0700] "GET /apache_pb.gif HTTP/1.0" 200 2326 "-" "-" "-" 213.135.131.79 - - [15/May/2012:19:21:49 -0400] "GET /features.htm HTTP/1.1" 200 9955 "http://www.abc.com...
2013-02-03, 2613👍, 0💬

Capturing host name from Apache Web log file
How to capture the remote host name from Apache Web log file? Here are some Apache Web log file entries:127.0.0.1 - frank [10/May/2012:13:55:36 -0700] "GET /apache_pb.gif HTTP/1.0" 200 2326 "-" "-" "-" 213.135.131.79 - - [15/May/2012:19:21:49 -0400] "GET /features.htm HTTP/1.1" 200 9955 "http://www....
2013-02-03, 1966👍, 0💬

Parsing all elements of URL addresses
How to parse out all elements from URL addresses with a regular expression? Here are URL address examples:ftp://ftp.example.org /https://login.example.com:5800 /?mode=guest&lang=enhttp://www.google.com:80/api/e xample/submit.php?name=joe#newfile://localhost/c|/WINDOWS/do cument.html#chapter1URL ...
2013-02-03, 2054👍, 0💬

Capturing fragment id from URL
How to capture fragment id from URL addresses with a regular expression? Here are URL address examples:ftp://ftp.example.org /https://login.example.com:5800 /?mode=guest&lang=enhttp://www.google.com:80/api/e xample/submit.php?name=joe#newfile://localhost/c|/WINDOWS/do cument.html#chapter1URL add...
2013-02-03, 2081👍, 0💬

Capturing query string from URL
How to capture query string from URL addresses with a regular expression? Here are URL address examples:ftp://ftp.example.org /https://login.example.com:5800 /?mode=guest&lang=enhttp://www.google.com:80/api/e xample/submit.php?name=joe#newfile://localhost/c|/WINDOWS/do cument.html#chapter1URL ad...
2013-02-03, 2048👍, 0💬

Capturing path name from URL
How to capture path name from URL addresses with a regular expression? Here are URL address examples:ftp://ftp.example.org /https://login.example.com:5800 /?mode=guesthttp://www.google.com:80/api/e xample/submit.php?name=joe#newfile://localhost/c|/WINDOWS/do cument.html#chapter1URL addresses are wri...
2013-02-03, 2488👍, 0💬

Capturing port number from URL
How to capture port number from URL addresses with a regular expression? Here are URL address examples:ftp://ftp.example.org https://login.example.com:5800 /http://en.wikipedia.org:80/wik i/WWW.html#Historyfile://localhost/c|/WINDOWS/cl ock.aviURL addresses are written in this format: scheme://domai...
2013-02-03, 1904👍, 0💬

Capturing scheme name from URL
How to capture scheme name from URL addresses with a regular expression? Here are URL address examples:ftp://asmith@ftp.exam ple.orghttps://login.example.com:5800 /http://en.wikipedia.org/wiki/W WW.html#Historyfile://localhost/c|/WINDOWS/cl ock.aviURL addresses are written in this format: scheme://d...
2013-02-03, 2208👍, 0💬

Capturing domain name from URL
How to capture scheme name from URL addresses with a regular expression? Here are URL address examples:ftp://ftp.example.org https://login.example.com:5800 /http://en.wikipedia.org/wiki/W WW.html#Historyfile://localhost/c|/WINDOWS/cl ock.aviURL addresses are written in this format: scheme://domain:p...
2013-02-03, 1946👍, 0💬

Case insensitive modifier - i
What is case insensitive modifier? How to use it? How to write a regular expression to capture the "DIM" key word from this code example:Dim intArray(10, 10, 10) As Integer ReDim Preserve intArray(10, 10, 20) ReDIM Preserve intArray(10, 10, 15) Redim intArray(10, 10, 10) The regular expression to ca...
2013-02-03, 2027👍, 0💬

Finding repeating words in a document
How to find repeating words in a text document with a regular expression? An example text document is listed below:After narrowly escaping a sensitive decapitation, Bond Bond is shot with a tranquilizer gun. He wakes up up on a plane to a woman standing over him, who introduces herself: "My name is ...
2013-02-03, 1896👍, 0💬

Capturing attributes of XML elements
How to capture attributes of XML elements in XML documents? An example XML document is listed below: The regular expression to capture attributes of XML elements in an XML document can be written as: ([^\s=]+)\s*=\s*"((?:[^"]*\")* [^"]*)"Note that: ([^\s=]+) - Attribute name ((?:[^"]*\")*[^"]*) - At...
2013-02-02, 1953👍, 0💬

Does negative character class match newline
Does negative character class [^a] match newline characters? How to write a regular expression to capture tags and attributes from this HTML code: A negative character class will match the newline character, if the newline character is not listed in the class. For example, "[^a]" will match the newl...
2013-02-02, 2064👍, 0💬

Finding & characters in HTML document
How to find &amp; characters that are not part of HTML entities in HTML code? The the example HTML code is listed below:a & b c &amp; d a &lt; b c &#8364; d c && d The regular expression to find &amp; characters that are not part of HTML entities in an HTML document c...
2013-02-02, 2255👍, 0💬

Finding mismatching quotes in a code line
How to find mismatching quotes "..." in a program code line with a regular expression? The the example program code is listed below:error = "Line "+line+" position "+position+" has invalid character "+char; warning = "The quote character (") may cause problem at line "+line+" position "+position; Th...
2013-02-02, 1932👍, 0💬

Using multiple lines and single line modifiers together - ms
What happens if I use multiple lines modifier, m, and single line modifier, s, together? How to write a regular expression to capture each bullet statement from this sample text:- The DAEMON or VENDOR label. - If the path is missing or incorrect, the product placed in the same directory as the x dae...
2013-02-02, 1999👍, 0💬

Single line modifier - s
What is the single line modifier? How to use it? How the single line modifier can be used on this example text:class Hello { public static void main(String[] args) { System.out.println("Hello World!"); // Display the string. } } The single line modifier 's', also called "dot all" modifier, modifies ...
2013-02-02, 2203👍, 0💬

Using negative character class [^...]
What is a negative character class? How to specify a negative character class in a regular expression? How to use negative character class to capture words that contains no vowel letters in this lyrics: Daddy started out in San Francisco, Tootin' on his trumpet loud and mean, Suddenly a voice said, ...
2013-02-02, 2702👍, 0💬

Using character class [...]
What is a character class? How to specify a character class in a regular expression? How to write a regular expression using character classes to capture 7 digits phone numbers from this example string "123-4567, 123 4567 or 1234567"? A character class allows a set of possible characters, rather tha...
2013-02-02, 2313👍, 0💬

Multiple line modifier - m
What is the multiple line modifier? How to use it? How the multiple line modifier can be used on this example text:06/10/2009 04:21 PM 69,584 avicap.dll 06/10/2009 04:21 PM 109,456 avifile.dll 07/13/2009 04:41 PM 32,816 COMMDLG.DLL 07/13/2009 04:41 PM 2,000 keyboard.drv 06/10/2009 04:42 PM 9,936 lze...
2013-02-02, 2226👍, 0💬

< 1 2 3 4 5 6 > >>   Sort: Rank