I have the following text:  (Some text before...) display_name = lo name = lo is_up = 1 index = 1 is_virtual = 0 is_point_to_point = 0 MTU = 65536 hardware_address = (null) parent = (null) ip_counter = 2 inet6 addr = /::1 inet addr = /127.0.0.1 ---------------End_of_text--------------------- (Some text after...)   I'm trying to get this all part between "display_name = lo" and "---------------End_of_text---------------------", when "display_name = lo" and "End_of_text" are not include.  I tried to run the following:  String pattern = "^\\sdisplay_name = lo\\s+(.*)---------------End_of_text---------------------";          Pattern r = Pattern.compile(pattern, Pattern.DOTALL);          Matcher m = r.matcher(interfaceData);          if (m.find()){             System.out.println("Group 0 found value: " + m.group(0) );             System.out.println("Group 1 found value: " + m.group(1) );             System.out.println("Group 2 found value: " + m.group(2) );         }         else {System.out.println("NO MATCH");}   There is no match, what am I missing?
For example, this regex  (.*)&lt;FooBar&gt;   will match:  abcde&lt;FooBar&gt;   But how do I get it to match across multiple lines?  abcde fghij&lt;FooBar&gt;
I've just updated to the latest Google Chrome Dev build, and they've changed from the annoying-but-ok new tab page to an ugly and less usable page.  On the old one, nine thumbnails was not enough, and now they've restricted it to eight.  There's an empty "Tips and Suggestions" box which I wouldn't want even if it had stuff in; they've added Recent Downloads - on the rare occasions when I need that, I'll hit Ctrl-J to open the Downloads tab; and the site-specific search box on the right has now gone!  Is there a way to get the old new tab page back, or a plugin to provide a superior one?   Update: I launch Chrome by pressing Win+R and entering "chrome" - I have a shortcut on the Path with a Target of "C:\Documents and Settings\&lt;user&gt;\Local Settings\Application Data\Google\Chrome\Application\chrome.exe" --old-new-tab-page and whilst double-clicking this shortcut brings up the previous new tab page, using the keyboard method results in the old one.  How do I get it working via the Run box? (Without using a batch file, which slows things down too much.)  Update 2: GRRR! Now they've gone and stopped the --old-new-tab-page parameter from working at all! I hate this new version of the page that they're forcing upon us - can anyone provide a method to get rid of it and get the decent page back? Prove $ \forall c \in \mathbb{R^{+}}, \forall B \in \mathbb{N}, \exists n \in \mathbb{N}, (n \geq B) \wedge (\sqrt{2n} > c \ln(n+2)) $? If $p$ and $q$ are distinct primes such that $p|c$ and $q|c$, prove that $pq|c$ Take the following class as an example:  class Sometype {     int someValue;      public Sometype(int someValue)     {         this.someValue = someValue;     } }   I then want to create an instance of this type using reflection:  Type t = typeof(Sometype); object o = Activator.CreateInstance(t);   Normally this will work, however because SomeType has not defined a parameterless constructor, the call to Activator.CreateInstance will throw an exception of type MissingMethodException with the message "No parameterless constructor defined for this object." Is there an alternative way to still create an instance of this type? It'd be kinda sucky to add parameterless constructors to all my classes. How to reorder /etc/resolv.conf at load time I have a CentOS system that retrieves its upstream DNS servers via DHCP.  I want to run DNSMasq on this box and use it as a server to resolve some hostnames for development.  The problem is when my system starts, the upstream DNS servers are loaded into /etc/resolv.conf and THEN the DNS1 entry from my ifcfg-enp0s3 setup gets loaded.   That's a problem because when I query for the internal dev names, it tries to go out to the upstream DNS server instead of checking DNSMasq first.  I need the DNSMasq server to be at the TOP of the /etc/resolv.conf and the dhcp loaded ones at the bottom of the resolv.conf so that DNSMasq will work properly.  Any simple way to do that? Proof that an integral domain that is a finite-dimensional $F$-vector space is in fact a field Get rid of the question ban on Meta; suspend actively harmful users manually Is it possible to load some package from a .sty file only if some option is selected?  (Naive approach \DeclareOption{something}{\RequirePackage{something}} doesn't work.) Copying and pasting text between applications without style When pasting text, some applications (Chrome, Microsoft Office, etc.) will do what they can to re-render copied text with style, and some of those applications do not appear to offer an option to paste without style.  This results in spending lots of time removing formatting (where it is even possible) and then cleaning up the mess left behind, just to get clean text.  I want to prevent text styling from attaching itself to text that I copy and paste between applications. Is there an OS-level way to do this, i.e. one that can apply to all applications? Failing that, is there a per-application way to tell Chrome, Safari, Word etc. not to copy and/or paste with style? How to log out user from web site using BASIC authentication? Does adverb placement affect meaning? He swam slowly to the island.  He slowly swam to the island.    Some experts say that there is a “slight difference” in meaning. Would you please tell me that difference? FFMPEG video from images comes out same (yet incorrect) duration regardless of frame rate Do I have to buy or need a 3D-enabled phone to use Google Cardboard? Google cardboard comes with 3D glasses. Does that mean that we will be able to watch 3D videos using a smartphone like the Moto-G (1st edition) which is not 3D enabled? What to do when witches appear early in the game? How to separate iMessages with shared Apple ID? My son and wife both have iPod Touches and I have an iPhone. We all used the same Apple ID and turned on iMessage. Both my son and wife were getting texts from my friends and my work on their iPods, I think because my cell phone number was linked to the Apple ID.  If I just turn off iMessage on my iPhone, will that solve the issue? Compare 1st column of the 1st file and 2nd column of the 2nd file and matching What DC motor specs do I need to lift a weight with certain gear configuration I'm new to Ubuntu. I tried installing it with Windows 8.1, but failed I lost all my files.  I have successfully formatted my PC and installed Ubuntu, but how do I install codecs to play audio and videos files ? What causes 5 pink bars on 27" iMac (2011)? I've got a 27 inch iMac made in 2011 that displays 5 pink vertical bars on the screen. It won't boot properly. I ran the Apple Hardware Test and it came up clean.   Machine Specs:  Apple Subfamily:    Mid-2011  Apple Model No: A1312 (EMC 2429) Model ID:   iMac12,2 Why sum of two little "o" notation is equal little "o" notation from sum? Why sum of two little "o" notation is equal little "o" notation from sum?  $o( f(n) ) + o( g(n) ) = o( f(n) + g(n) ) ?$  For example:   $f(n) = n^3$  $g(n) = 1/n$   so    $o(f(n)) = n^2$  $o(g(n)) = 1/n^2$   and    $o( f(n) ) + o( g(n) ) = n^2 + 1/n^2$ $o( f(n) + g(n) ) = n^2$   Of course, I could write it like   $o( f(n) ) + o( g(n) ) = n^2 + o( g(n) )$ $o( f(n) + g(n) ) = n^2 + o( g(n) )$   My question is why? I don't understand it, because in first we always get two parameters.