How can I fix my regex to not match too much with a greedy quantifier? I have the following line:  "14:48 say;0ed673079715c343281355c2a1fde843;2;laka;hello ;)"   I parse this by using a simple regexp:  if($line =~ /(\d+:\d+)\ssay;(.*);(.*);(.*);(.*)/) {     my($ts, $hash, $pid, $handle, $quote) = ($1, $2, $3, $4, $5); }   But the ; at the end messes things up and I don't know why. Shouldn't the greedy operator handle "everything"?
My regex is matching too much. How do I make it stop? I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully  I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}:  The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}?
How to filter a dictionary according to an arbitrary condition function? Combined flair is showing hidden accounts The combined flair started to display in this week site icons from hidden accounts. For example, this is my current flair:  The freehand red circle shows a hidden community that you can't see in my . This issue looks to me as a privacy issue. Being associated with a SciFi community or Arqade is not a bad thing for my serious work-only profile, but it could be indeed an issue for people trying to hide association with a religious community due to the dark times that we are living on. I know that this question is similar to , but I'm posting this as  of Adam Lear Why is it that the classical path gives the dominant contribution in the quantum mechanical path integral? How do we understand this? Ubuntu: Resize the root LVM(2?) partition How can I use Bengali script in an English document? Scenario: SQL Server 2014 CU6. 1 AG with 2 databases (compatibility level 100). Failover Cluster with 3 nodes on Windows Server 2012 R2. Primary Availability Replica on node 1 and node 2. Secondary Availability Replica on node 3 (no votes). Async commit, manual failover, readable secondary. Node 3 is used to run reports on these 2 databases (out of 8 databases running outside AG on node 1 and 2).   Problem: Looking to patch these from SQL 2014 to SP1 and latest CU. Not my build and no experience with AG or FC so far. My "test" environment is also used for development, so no room for mistakes.   Questions:  What's the best order to patch the 3 nodes ?   Do I first have to remove the databases from AG on the node I'm patching ?  Do I need to take the Secondary out when patching it ?  No experience on this, and I can't find clear answers for my scenario (maybe not supported?) in the docs: Why is carbon dating limit only 40,000 years? Prove $2^k+1$ divisible by 3 for odd K Show that when $BA = I$, the solution of $Ax=b$ is unique I'm just getting back into having to do linear algebra and I am having some trouble with some elementary questions, any help is much appreciated.  Suppose that $A = [a_{ij}]$ is an $m\times n$ matrix and $B = [b_{ij}]$ and is an $n\times m$ matrix and $BA = I$ the identity matrix that is $n \times n$.  Show that if for some $b \in \Bbb{R}^m$ the equation $Ax = b$ has a solution, then the solution is unique. Create a text file using user input from a batch file Is it possible to write a batch file that will create a popup window for the user to input some specific information, and place that information into a text file? The text file should already have some text in it but I just want a couple lines to have input from the user. This is what the text file should look like:  PARTSN="USER INPUT1" PART=blahblah WORKSTATION=blahblah USERID="USER INPUT2" SIZE=blahblah   Where it says "USER INPUT1,2" is where I want the information from the user placed.  Any help would be great! Which derivation of drift velocity is correct? In the derivation of drift velocity I have seen two variations and want to know which one's correct.   $s=ut+\frac{at^2}{2}$ Assume that the drift velocity of any electron in any conductor is : $$\vec{v_d}=\frac{\vec{l}}{t}$$ Due to the electric field the acceleration of electrons in any conductor is: $$a=\frac{-e\vec{E}}{m}$$ Now the distance travelled by an electron after a long time (initial thermal velocity = 0) $$l=\frac{at^2}{2}\implies \frac{-e\vec{E}t^2}{2m}$$ the time between the collisions is $\tau$ $\therefore$ $$l=\frac{-e\vec{E}\tau^2}{2m}$$ thus the velocity is $$\vec{v_d}=\frac{-e\vec{E}\tau}{2m}$$ In another proof I saw the author using $v=u+at \implies v_d=\frac{-e\vec{E}\tau}{m}$   My question is which of the the two equations of motion can be used in the proof? Can they be used at all. listing files with pattern with starting and ending Why does unequal amounts of RAM in each slot decrease performance? describes the RAM specifications for many of the MacBook laptops. In the section for my laptop (13" Pro Late 2011), it says:     Additional Notes: For best performance, fill both memory slots, installing an equal memory module in each slot.   This isn't the first time I've heard of this phenomenon, and it's definitely not specific to Apple.   Why is this the case? Other than the obvious decrease in available memory, why would it be worse to run with 6GB (1x4GB + 1x2GB) than with 8GB (2x4GB)? How do I display 2 sections side-by-side? How to bake to vertex colors in blender cycles? I'm trying to split text in a JTextArea using a regex to split the String by \n However, this does not work and I also tried by \r\n|\r|n and many other combination of regexes. Code:  public void insertUpdate(DocumentEvent e) {     String split[], docStr = null;     Document textAreaDoc = (Document)e.getDocument();      try {         docStr = textAreaDoc.getText(textAreaDoc.getStartPosition().getOffset(), textAreaDoc.getEndPosition().getOffset());     } catch (BadLocationException e1) {         // TODO Auto-generated catch block         e1.printStackTrace();     }      split = docStr.split("\\n"); } How did the transdimensional Edo god (Edo lord) come to be the overseer of the Edo? Prove $\frac{1}{1 \cdot 3} + \frac{1}{3 \cdot 5} + \frac{1}{5 \cdot 7} + \cdots$ converges to $\frac 1 2 $ Show that $$\frac{1}{1 \cdot 3} + \frac{1}{3 \cdot 5} + \frac{1}{5 \cdot 7} + \cdots = \frac{1}{2}.$$  I'm not exactly sure what to do here, it seems awfully similar to Zeno's paradox. If the series continues infinitely then each term is just going to get smaller and smaller.  Is this an example where I should be making a Riemann sum and then taking the limit which would end up being $1/2$? I need to exclude .git from my find search. To achive that, I am using the -path ./.git -prune switch:  $ find . -path ./.git -prune -o \( -type f -o -type l -o -type d \) | grep '.git' ./.git   However, even though this skips the contents of the .git directory, it lists the directory itself. It works when I add -path ./.git -prune -o -print -a  find . -path ./.git -prune -o -print -a \( -type f -o -type l -o -type d \) | grep '.git'   Why is this necessary. I thought that both commands should have same output. The second syntax is quite ugly. Recurrence relation for the determinant of a tridiagonal matrix Let  $$f_n := \begin{vmatrix} a_1 &amp; b_1 \\ c_1 &amp; a_2 &amp; b_2 \\ &amp; c_2 &amp; \ddots &amp; \ddots \\ &amp; &amp; \ddots &amp; \ddots &amp; b_{n-1} \\ &amp; &amp; &amp; c_{n-1} &amp; a_n \end{vmatrix}$$  Apparently, the determinant of the tridiagional matrix above is given by the recurrence relation   $$f_n = a_n f_{n-1} - c_{n-1} b_{n-1}f_{n-2}$$  with initial values $f_0 = 1$ and $f_{-1} = 0$ (according to Wikipedia). Can anyone please explain to me how they came to this recurrence relation?  I don't really understand how to derive it.