Let me take an example to show clearly the issue; say I want to match all alphabetic strings wrapped by double curly braces {{ }} which can contain curly braces as well. here is the expression i tried  /{{([A-Za-z {}()]+)}}/g   but when i give this input  "{{foo}} {{bar}}"   it matches foo}} {{bar and not foo bar as i wanted.  so my quetion is how  do i solve this ?  and is there a way to escape double braces in case i want to explicitly write them and not be considered by the regex ?
Unfortunately, despite having tried to learn regex at least one time a year for as many years as I can remember, I always forget as I use them so infrequently. This year my new year's resolution is to not try and learn regex again - So this year to save me from tears I'll give it to Stack Overflow. (Last Christmas remix).  I want to pass in a string in this format {getThis}, and be returned the string getThis. Could anyone be of assistance in helping to stick to my new year's resolution?    Related questions on Stack Overflow:
Keyboard layout isn't kept upon reboot I had a problem with the keyboard layout changing from PT (I'm Portuguese) to EN automatically with the last Ubuntu updates in Ubuntu 13.10. After Ubuntu 14.04 came out, I formatted my computer and installed the new version.  After that I haven't had any problems until the recent Ubuntu base update 2 or 3 days ago, when I started having the same problem again. I even removed the English keyboard from the Keyboard configurations, left only the Portuguese one, but still, every time I reboot my PC I get the keyboard configured for EN, despite Ubuntu displaying the contrary?  How can I remove this? I don't want to format the PC again and I'm getting really tired of this problem, since it looks like many Portuguese/Brasilian Ubuntu users are having the same problem. Yesterday, I tried to dualboot Ubuntu 16.04 onto my hard drive, creating a new partition for Ubuntu alongside my existing Windows 8. First, I disabled the fast-boot option in Windows 8, and still GRUB did not load, and it went directly to Windows boot-up. Then I did some research and found this article:     Basically, I issued the BCDEdit command in Windows, and entered in the following code:  bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi   When I reboot, I get a basic GRUB2 terminal, and after I type in the exit command, then a second Shell prompt appears, and after typing the exit command again, the GRUB2 menu to select the OS to boot finally appears... with only Ubuntu and Ubuntu memory test as options, not Windows 8.  After booting into Ubuntu, I tried to run the Boot-repair Utility, but that shows this following error:   How do I approach this problem? The Pastebin log is here:   Thanks for the help! I tried running Android 4.1.1 in VirtualBox, but it was too slow and sluggish to do anything. I came across Windroy which runs Android as a Windows app, but it won't run Google Play.  I want to run this on my laptop.  Any help would be greatly appreciated. I am attempting to solve this counting problem through combinatorial argument. The following is the equation I am given:   $$\sum_{i=1}^n (i-1)(n-i) = \binom{n}{3}$$  I understand that the right-hand side of this equation represents a set of $n$-elements out of which we choose 3. For example I believe we can say suppose we have a group of $n$ people and we want to choose 3 out of $n$ to be in a committee. However I'm not sure how to express the left-hand side in words. If forming a committee is an appropriate way to tackle this problem then I know the left-hand side must utilize the addition and multiplication principles, but I don't know how to put it into words. Also my intuition tells me that in solving this we should first flip $$(n-i)(i-1)$$  Thanks! Modified files in a git branch are spilling over into another branch How to remove Open CTI VF softphone page from salesforce left side Open CTI Softphone VF page is showing in salesforce left side. How to remove this ? Screenshot attached Finishing a proof: $f$ is injective if and only if it has a left inverse I've already done a lot of searching (in particular: ) to try to prove this statement:      $f: A \to B$ is injective if and only if it has a left inverse. [I'm going to also assume $A$ and $B$ are nonempty.]   My attempt so far:     $\Leftarrow$ Suppose $f$ has a left inverse and $f(a_1) = f(a_2)$ for    $a_1, a_2 \in A$. Then there is a function $g: B \to A$ such that   $g\left(f(a_1)\right) = a_1$ and $g\left(f(a_2)\right) = a_2$. Since   $g$ is well-defined, it follows that $g\left(f(a_1)\right) =  g\left(f(a_2)\right)$, and hence $a_1 = a_2$.         $\Rightarrow$Now   suppose $f$ is injective. Then $f(a_1) = f(a_2) \implies a_1 = a_2$.   Furthermore, since $A$ is nonempty, there is an element $x \in A$.   Define $g: B \to A$ by  \begin{equation*} g(b) = \begin{cases}  f^{-1}(b), &amp; b \in \text{Im}(f) \\ x, &amp; b \in A \setminus  \text{Im}(f)\text{.} \end{cases} \end{equation*} This mapping is   well-defined, since if $f$ is injective, $f^{-1}(b)$ is unique.   My main question: does this imply that if $f: A \to B$ is injective that any mapping $g: \text{Im}(f) \to A$ is bijective? Otherwise, I don't understand why we can even use $f^{-1}$ on an element. [Please read the link above for more details - in proof 1.] Is zero odd or even? In Lubuntu, there's no 'Add New Program...' button in Desktop Session Settings. Is there an easy way to add new autostart programs in Lubuntu? I want to see all my Questions and Answers in a particular SE site -  - profile page through Stack Exchange Android App. How can I see that? When I tried to see that I found only Top Posts(5) and Top Tags. Trying to find a TV show about an event that leaves everyone dead apart from people who died at the moment of the event? This was a TV show aired in the UK probably sometime between 1990 and 1993, if memory serves it was only a one-off. The plot starts with the protagonist waking up in bed and being disappointed. He eventually goes outside and everyone is dead, whatever they were doing at the time they died doing it (driving, working, etc.) The protagonist is in a state of panic running around town (I seem to remember it being set in the UK) and he discovers that he's is 'alive' because he'd attempted suicide and died at the exact moment this mysterious event happened. I think he encounters others that 'died' at the time of the event and that's when he realises. I think the protagonist was a bald, white man, probably mid-thirties. Sorry for any vagaries, I was VERY young when it was on. Until recently I assumed it was The Quiet Earth but I've checked and it definitely isn't. It was in colour and was contemporary at the time so it would have been made around 1990. copy ssh private keys to another computer Problem with camera orientation in motion tracking sorry for my English, I write from Italy. I'll try to explain my problem. I'm tracking a footage with a solver error 0.2973. When I try to set the floor, the orientation of the camera is wrong (see screenshot).  So I tried to manually orient the camera, but even if well oriented respect to the xyz axes, geometry is incorrect as you can see from the screenshots below (the selected marker appears to be on the same plane but it is lower).  The video was recorded by a roof of a house so much higher than the road. It seems that Blender is not able to recognize this height and set the floor in a wrong point of view. Can someone help me solve this problem? Thank you Question about repeating decimal? For simple fraction, we can easily convert it to repeating decimal by calculator. Ex. $\frac 1 3 = 0.33333\ldots$, $\frac 1 7=0.(142857),\ldots$ But some fraction fraction like $10/29, 1/97,...$ The repeating part of them are too long, so it can't fully show on the calculator. So is there any algorithm  to find the repeating part for that fraction? "Same as I do" or "same as I have" She has the same book as I have.  Isn't it supposed to be She has the same book as I do?  But I often hear the former.  Why? How to connect portable monitor USB Type-C to graphic card with display port or hdmi I have a manuscript that is under review in a major journal which is a main result out of a few recent years of my research. When applying for faculty positions, I would like to send the draft as a part of my writing sample. But since the material is not yet published, I am not sure if it is a good idea.  What are the foreseeable disadvantages of sending an article in review to the faculty search committee?  My area is neuroscience / biomedical engineering.  Update: The paper got into a high-profile journal, and I got a job at a different place which did not require a writing sample. My brother owns Skyrim on steam. We use Steam Family Share, but we were wondering how both of us could play it at the same time? :     "Food left on plates after eating is   defined as garbage (jutha) because it   has been polluted by the eater’s   saliva. It may be handled in the   family.   Is there an English word for something that is not eatable or usable by others because it has someone's saliva on it? How to write a LaTeX package that bundles not only .sty and .cls files but also some logos in .pdf or .eps formats? I would like to make a LaTeX package with the following subdirs:   tex/latex/common (a common .tex file shared among beamer and letter) tex/latex/resources (lots of pdf and eps files with graphical resources) tex/latex/mybeamer (a custom beamer theme with 5 .sty files) tex/latex/myletter (a .cls file for a letter template)   I would like to package these files into a single LaTeX package that users could install in an easy way. I read about the .ins and .dtx files and I can see how to pack the .sty and .cls files but what about the extra graphics - the resources folder which contains several PDF and .eps files?