I need help about regular expression matching with non-greedy option.  The match pattern is:  &lt;img\s.*&gt;   The text to match is:  &lt;html&gt; &lt;img src="test"&gt; abc &lt;img   src="a" src='a' a=b&gt; &lt;/html&gt;   I test on   This expression matches all text from &lt;img to last &gt;. I need it to match with the first encountered &gt; after the initial &lt;img, so here I'd need to get two matches instead of the one that I get.  I tried all combinations of non-greedy ?, with no success.
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;
Why did Dumbledore drink the potion in the attempt to get a Horcrux? Is there anything like GF(6)? I have been reading for days about how to remove the Google Search Bar from the top of my Nexus 6 since I never use it. I have gotten mixed answers on exactly what file to delete and where it is.  I have heard quicksearchbar.apk but it's not in /system/app like in previous versions. Does anybody know where the file/files are I need to delete in order to get rid of the search bar, or else, how to remove it? Preferably not downloading another launcher, since I don't want to bloat my phone when I could reduce the size. How can we play split screen in the XBOX 360 version of Minecraft? My little brother and I want to play Minecraft together on the Xbox 360, and we heard there was a split screen option. We've looked inside the options menu but weren't able to find it. Does the game really have a split screen option, and if so, how do we enable it? "A friend of my father" vs. "a friend of my father's" — which one is right? Why? I have seen them both in my reference book, which is written by a native speaker. I wonder why there are two different phrases to describe the same meaning and am looking forward to some reasonable details to explain why this is so. "named" vs "that is named" I want to describe my business and want to refer to it in a sentence.  I am trying to say:      "In 2015 we established a business (that is) named X".   Intuitively, the "that is" part is redundant, and makes the sentence more cumbersome. But I cannot think of a reason why we should be able to drop the verb.  Is the version without the "that is" part grammatically correct? How can it be explained? Grepping through .gz log files Does there exist a magical shell piping which would allow easily to grep through bunch of .gz log files without needing to extract them somewhere?  .gz files are Apache logs, result of log rotation. I'd like to quickly check how often certain URIs are accessed in the past. 3 prong to 4 prong dryer cord change My 2 year old whirlpool dryer has a 3 prong cord. My new house has a 4 prong. The dryer doesn't have a spot for 4 wires. The ground wire coming from the dryer is attached to the dryer itself. A new 4 pronged dryer cord has white, red, black, and green wires. Maybe the green wire hooks to the ground screw with the one coming from the dryer? I installed some version of Ubuntu on my VMware, but I don't know what version exactly it is. How can I find it out? Why won't this command work? /summon Villager ~ ~2 ~ {Offers:{Recipes:[{buy:{id:371,Count:15},sell:{id:264,Count:4}}   I'm using this as a recycler villager, and I can't get the first trade to work. What's going on? Windows 7 Automatic Log-on with a Default User Account? I have two User Accounts for my Windows 7 with no password requirement. I frequently use one of those accounts; so I would like Windows to log-on automatically with that account without the need for user input.  P.S. I don't prefer installing/using a third-party software for that purpose; especially those that place at low levels before Windows log-on. Flying EU to UK to EU. Can I get duty free alcohol? On the 20 of March this year I will be flying from Ireland to the UK and then on the another EU country.  Can I buy duty free alcohol (as in alcohol with no tax) leaving the UK ? Writing my first script so I'm sure this is a basic question, but can someone please explain to me why I can:  cd ~ cd bin cd ~/bin cd 'bin'   But not  cd '~' cd '~/bin'   I need to cd to a directory path with a space in one of the directory names, so I need the quotes (it's Windows Program Files under wine). I can get around it with two cd commands, but why can't I put ~ in quotes?  If I type cd '~' (or cd "~") I get:  bash: cd: ~: No such file or directory How to Expand , Resize "extended partition"? How can I expand/resize my extended partition (sda3) with unallocated free space to the left of it? I want this to be able to expand my / partition (sda5). I'm starting out in Visual C++ and I'd like to know how to keep the console window.  For instance this would be a typical "hello world" application:   int _tmain(int argc, _TCHAR* argv[]) {     cout &lt;&lt; "Hello World";     return 0; }   What's the line I'm missing? When testing the difference between 2 proportions why do we use a z-test rather than a t-test?    Further, is there a simple way to conduct an omnibus test for significant differences between more than 2 proportions (in the form of percentages). Is there an equivalent to a one-way ANOVA for this?  I imagine that you could use logistic regression (assuming you have the original data for the proportions in the form of 0s and 1s) Are there other options? Do the parent directory's permissions matter when accessing a subdirectory? If I have a root folder with some restrictive permission, let's say 600, and if the child folders/files have 777 permission will everybody be able to read/write/execute the child file even though the root folder has 600? You have 6 red balls, 6 blue, and 6 white. You randomly select a sample of 3 balls without replacement. The balls, save for the color, are indistinguishable from each other. What are the odds that your sample contains at least a ball from each color?  I thought about finding the chance that the sample will not contain at least one color and subtracting that from one:  $$P(\text{sample is missing at least one color})=P(\text{sample is missing one color})+P(\text{sample is missing two colors}) $$  Essentially the second probability statement on the right hand side is the probability that all the balls in the sample are the same color. The case where the sample does not contain three colors doesn't make sense, so I didn't include it. $$=\binom{3}{1} \left[\left(\frac{12}{18}\right) \cdot \left(\frac{11}{17}\right) \cdot\left(\frac{10}{16}\right)\right]+\binom{3}{2}\left[\left(\frac{6}{18}\right) \cdot \left(\frac{5}{17}\right) \cdot\left(\frac{4}{16}\right)\right] \approx 0.882353$$  When all of this is done, we simply subtract the probability from one to get $0.117647$.  What am I doing wrong? SQL Server 2000 on Windows 10 I need to install SQL Server MSDE 2000 SP4 on Windows 10.  I have other machines that run Windows 7 and 8.1 and SQL Server MSDE 2000 works fine (with merge replication configured too).  Now I testing the same scenario with Windows 10, but setup is closing unexpectedly during installation.  I know that this version is very old, but is there a workaround to install it on Windows 10? I am stuck at my exam practice here.      The remainder of the division of $x^3$ by $x^2-x+1$ is ..... and that of $x^{2007}$ by $x^2-x+1$ is .....   I tried the polynomial remainder theorem but I am not sure if I did it correctly.  By factor theorem definition, provided by ,     the remainder of the division of a polynomial $f(x)$ by a linear polynomial  $x-r$ is equal to $f(r)$.   So I attempted to find $r$ by factorizing $x^2-x+1$ first but I got the complex form $x=\frac{1\pm\sqrt{3}i}{2}=r$.   $f(r)$ is then $(\frac{1+\sqrt{3}i}{2})^3$ or $(\frac{1-\sqrt{3}i}{2})^3$ which do not sound right.  However, the answer key provided is $-1$ for the first question and also $-1$ for the second one. Please help.