I'm using this regex string:  /rfi .*?(.*) .*?\((.*)\)/i   Group 1 finds the rfi number &amp; group 2 returns the contents inside the ( ). With test string: "New RFI 087 (Concrete Beam at Planter)" everything works fine, but with test string "New RFI 087 (Concrete (Beam) at Planter)" it crashes.  Is there anyway to search inside the ( ) but ignore multiple ( ) inside of it ?
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}?
what question should be asked to make a persona Tag badges are re-awarded for some users How do you install Google Chrome on Ubuntu? How to extract the last inserted row in SQL Server? When an insert statement is executed one or more rows is inserted into the table, is there any way to extract the last inserted row in SQL Server? When I was younger (11-12 years old, so the early 2000s) I once read a story where a young boy, who may have been either a young prince or a squire of some sort, is recruited by a wizard and taken to a city to train as a mage.  I seem to remember him living in dorms with the other children at this school, until he gets into difficulty with another of the boys in the dorm. He is kicked out of the dorms and ends up living above a blacksmith shop (I think).  I remember it being the first book in a series of books of which there were about 3 out at the time. I think one of the stories was about the boy going to a tower to do something or other.  Does anyone have any idea what this book series is? I haven't been able to find it for years now but it was a story I really loved. Cannot create custom config entity fails because ID is blank Can I use a HDD on my PS3 if I have already used another on the same console? I'm thinking of changing the Hard Disk of my PS3 (Slim 120GB), but I am unsure of what will happen to the data on the one I previously had if I do this:   PS3 has some data in the HDD. I turn off PS3, change HDD, install OS on new HDD. I download some data on new HDD from PS Plus.   Let's imagine I forgot to back something up...   I turn PS3 off, change HDD back.   Can I still use the old hard drive without needing to format it again? I am trying to list all the files from dir1, dir2, dir3 and dir4 which might be anywhere in as a sub directory of my cwd using the find command. I tried the following with no success:  find . -type f -regextype posix-egrep -regex 'dir1/.+|dir2/.+|dir3/.+|dir4/.+'   I tried posix-extended as well. How can I list these files? Algebraic Proof that $\sum\limits_{i=0}^n \binom{n}{i}=2^n$ Dual booting Windows and Ubuntu My laptop has 500gb hard disk in which for 250gb I installed Windows xp on C drive(primary partition). I want to install Ubuntu 12.04 in the remaing hard drive with dual boot option. When I am going to install Ubuntu it is showing something like  /boot /boot/   Can anybody help me in this regard that where and how to install Ubuntu? Conditionals (Past Tense) In terms of conditional sentences, is it correct to say:   if you knew why I WAS here, then I wouldn't need to be here.   or   If you knew why I WERE here, then I wouldn't need to be here.   Which type of conditional is this? Type 2? I was thought at school that there are three types of conditionals. Are there more of them? Why aliases in a non-interactive Bash shell do not work How can I check if a directory exists in a Bash shell script? What command can be used to check if a directory exists or not, within a Bash shell script? I have just upgraded to Ubuntu 17.10 and found out there is no option to have 2 by 2 workspaces. I was able to configure 4 "static" workspaces using , but I would like to have them in 2 rows by 2. Any ideas? "Heard me [infinitive]" vs. "heard me [present participle]"             At that time, you wouldn't have heard me talk about it.   At that time, you wouldn't have heard me talking about it.         At that time, you wouldn't have heard me condemn it.   At that time, you wouldn't have heard me condemning it.         Which one of the above sentences are incorrect and why? Finding determinant of matrix without expanding How to correctly add a path to PATH? I'm wondering where a new path has to be added to the PATH environment variable. I know this can be accomplished by editing .bashrc (for example), but it's not clear how to do this.  This way:  export PATH=~/opt/bin:$PATH   or this?    export PATH=$PATH:~/opt/bin I would like to download the alternate installation ISO for the current release, Ubuntu 13.10 Saucy Salamander, but I can't find it on the releases.ubuntu.com website. Aren't alternate ISOs provided anymore?  I need the alternate ISO because Xorg crashes on recent versions of Ubuntu when using old SIS on board graphics.  In fact, I just patched Ubuntu sources and generated a custom package for the xserver-xorg-video-sis driver on my PPA to try fix this problem, after installing with the minimal ISO. How to mount and unmount hard drives under Windows (the unix way) If a mass moves close to the speed of light, does it turn into a black hole? I'm a big fan of the podcast Astronomy Cast and a while back I was listening to a Q&amp;A episode they did. A listener sent in a question that I found fascinating and have been wondering about ever since.   From the show :      Arunus Gidgowdusk from Lithuania asks: "If you took a one kilogram mass and accelerated it close to the speed of light would it form into a black hole? Would it stay a black hole if you then decreased the speed?"   Dr. Gay, an astrophysicist and one of the hosts, explained that she'd asked a number of her colleagues and that none of them could provide a satisfactory answer. I asked her more recently on Facebook if anyone had come forward with one and she said they had not.  So I thought maybe this would be a good place to ask.