I'd like to match if x &gt; 64 then return 0, 0 end inside this string.   function if x &gt; 64 then return 0, 0 end return 1, 0 end   I'm using if(.*)then(.*)end. However, this matches: if x &gt; 64 then return 0, 0 end return 1, 0 end, which is one end too many.
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}?
so there are some idiosyncrasies with the method they use to invert that part of the image which I can't figure out. It could be that they just invert the luminosity but I don't know how i would do that in a dynamic way. How to find out the terminal command of an application? Randomly selecting elements without repetition Transit Visa for Thailand Is trace invariant under cyclic permutation with rectangular matrices? I'm working with trace of matrices. Trace is defined for square matrix and there are some useful rule, i.e. $\text{tr}(AB) = \text{tr}(BA)$, with $A$ and $B$ square, and more in general trace is invariant under cyclic permutation. I was wondering if the formula $\text{tr}(AB) = \text{tr}(BA)$ holds even if $A$ and $B$ are rectangular, namely $A$ is $n$-by-$m$ and $B$ is $m$-by-$n$. I figured out that if one completes the involved matrices to be square by adding zero entries in the right places, then the formula still works... but I want to be sure about this! At the end of Billions, Season 3, Episode 9, Grigor Andolov (John Malkovich) tells a story to Bobby Axelrod (Damian Lewis) about the Christmas market in Moscow. He asks a question about what happened to a boy:  Andolov: Many years ago, I was walking along the Moskva Christmas market. You ever seen Moskva Christmas market? Always a sense of good cheer, even during the lean years. I think it was the wine. They serve warm wine with the spices in it... cinnamon and... I was waiting on the line — everyone was always waiting on the line — and finally I got my cup, I turn, and there was this little boy. Runny nose. He looking at me so desirous of my cup of this warm, warm wine that I give him a sip. He stares at me with such a gratitude. And then I notice his mother. Plump breasts. She must have known someone. So I give him my cup of wine. And I take his mother away from the square. Behind the soldiers. And after, I leave her for the soldiers. And I walked back, and this little boy is staring at me with his greedy drunken eyes. Do you know what happened to him? Axelrod: No. Andolov: I always ask. No one ever knows.  What is the real meaning of this story? And how is it connected to the Axelrod – Andolov relationship? Why should the minimal class be avoided? Should I write "X and I", "X and me", "I and X", or "me and X" in a conjoined object? My English is pretty basic, please don't mind. Wondering how to make the liquify wave and distort color effect in Photoshop? I'd tried using distort>shear/wave/zigzag, but still can't make it similar like the photo below. On November 11, my American girlfriend flew over to the UK to visit me. She was detained and questioned, and refused entry under the belief she would not leave within those six months. This was due to her having no return flight booked, as we were going to wait until we were together in the UK to book a return flight for either herself, or both of us back to the USA once we decided what exact dates I would be able to travel. Lesson learned. A hard lesson, but we learned!  Anyway, they said although she'll flag up in the future, it won't be a straight ban from entering and she could even try to come back the next day if she so pleased, although it would be unwise if her circumstances had not changed.  Fast forward to December 18. She got herself a job in the States to prove she intends to leave at the end of her stay, and has since applied for a UK Standard Visitor Visa. She posted her documents off to New York earlier today.  Will they send her a letter back refusing to issue her a visa since, as an American citizen, she does not even need one? She wanted to get one to be safe as I told her not to fly to the UK even with return flights booked if she doesn't have a visa, as she risks being denied once again after a long flight. It's hard to get this information on the Internet, and some stories I read said that they were sent a letter back from the UK Embassy denying their visa simply because they don't need one in the first place - even after that person was denied entry.  We're in a bit of a pickle granted, so any help would be greatly appreciated.   Cheers. Interior of cartesian product is cartesian product of interiors I have to prove that:  $$Int(A\times B) = Int(A)\times Int(B)$$  Where $A\subset M$ and $B\subset N$, both $M$ and $N$ metric spaces.  The problem is that the exercise does not specify the metric, so I need to try to prove it using a generic metric.  If $x\in Int(A\times B)$, then an open ball can be centered at $(x,y)$ such that it is contained in $A\times B$. Therefore, this open ball, $B((x,y),r)\subset A\times B$. It means that $d((x,y),a)&lt;r$ for any $a\in A\times B$ for some $r&gt;0$. I guess that if I can take from here that $d(x,a)&lt;r$ and $d(y,a)&lt;r$ I can prove thhat $Int(A\times B)\subset Int(A)\times Int(B)$, but I still have to prove the other way around.   Any ideas? How to overwrite an excel application without prompting the users Prove that $\frac{1}{\sin^2 z } = \sum\limits_{n= -\infty} ^ {+\infty} \frac{1}{(z-\pi n)^2} $ I live in a town where fresh or whole milk is not readily available. I was wondering if I could make cheese from UHT Milk. If so, what kind of cheese and what method I should use? Or rather, Should I? The system cannot find the file specified I have just downloaded WinEdt and written my first code, but it will not run because I keep getting the following error.  I am at a loss as to how to fix this.  Error launching Console Application PDFLaTeX ... Command Line: pdflatex.exe --interaction=errorstopmode --synctex=-1 &quot;practice.tex&quot; Startup Folder: C:\Users\shahand\WinEdt Team\WinEdt 8 The system cannot find the file specified. List of chat rooms with host stackoverflow.com is not the same as the actual list of rooms on stackoverflow.com chat itself Generally chat.&lt;site&gt;.com redirects to chat.stackexchange.com/?tab=site&amp;host=&lt;site&gt;.com and go for same thing but here you can check your self:       Both are Different!  If one visits  and select site: StackOverflow, then it outputs  and they miss rooms that are only listed by .  So, why does this happen? Is this a bug?  Note: I found this while  for general chat-room at StackOverflow; see chat-discussion Adding an error on a dynamic referenced field Is there a way to add an error on a dynamically referenced field? Let's take this simple example:  opp.get('Name').addError('Invalid name');   This is not working, I'm looking for a similar minded way.  Thanks Sylow 2-subgroups of the group $\mathrm{PSL}(2,q)$ What is the number of Sylow 2-subgroups of the group $\mathrm{PSL}(2,q)$? C++ vectors (instead of arrays) What are the basis for co-countable and co-finite topologies