I've searched for questions like this, but all the cases I found were solved in a problem-specific manner, like using !g in vi to negate the regex matches, or matching other things, without a regex negation.  Thus, I'm interested in a “pure” solution to this:  Having a set of strings I need to filter them with a regular expression matcher so that it only leaves (matches) the strings lacking a given substring. For example, filtering out "Foo" in:  Boo Foo Bar FooBar BooFooBar Baz   Would result in:  Boo Bar Baz   I tried constructing it with negative look aheads/behinds (?!regex)/(?&lt;!regex), but couldn't figure it out. Is that even possible?
I know it's possible to match a word and then reverse the matches using other tools (e.g. grep -v). However, is it possible to match lines that do not contain a specific word, e.g. hede, using a regular expression?   Input:  hoho hihi haha hede   Code:  grep "&lt;Regex for 'doesn't contain hede'&gt;" input   Desired output:  hoho hihi haha
How to express trigonometric equation in terms of of given trigonometric function? How can I replace Windows with Ubuntu? Intuitive explanation of the inverse square power $\frac{1}{r^2}$ in Newton's law of gravity Recovering the data from a failed WD My Book NAS drive My Western Digital 500GB NAS drive (which is my main backup device) has recently broken. Windows can no longer use it as a network drive (using Map Network Drive), and the web-based control panel is INCREDIBLY sluggish, taking as much as 5 minutes to load a single page.  However, when it does load, it reports the Drive Status as OK, and has the correct disk usage values, which leads me to think the actual drive is OK, and it's the networking components that have failed.  I have checked the wires and router, and so it their isn't another point in the network causing the problem.  Is there any way to get the data back? It's a backup, so I still have about 80% of the data spread out across 3 computers (the only major loss being my music library, and I have the discs for a fair proportion of that).  However, it'd be much more convenient if I can get the data from the drive itself, as it is organised properly on the drive. I have named him/he who shall not be named. Which of these is correct? I think it should be "him" because "him" is a direct object in this context. In this context, "him/he who shall not be named" is not a proper noun. I'm having trouble with the OpenLayers Plugin of Qgis and the map composer:  If I create an OSM-background layer and if I want to export this, the OSM-Layer looks perfectly all right in the normal qgis program window. But in the map composer and after export the layer has shifted relatively to my other shape layers (EPSG:32633 - WGS 84 / UTM zone 33N).  The second thing is that the output resolution of the exported osm-layer is very, very poor.   A really bad way of getting around this whole trouble would be to increase the screen resolution and make a screenshot of the map composition window of qgis. But I don't think this would be very professional. It also would cause a lot of pain :)   I'm using Qgis 1.8.0-Lisboa under Linux. The openlayers plugin is version 0.92. Copy over ssh and execute commands in one session I need to define a new command to create a squiggle arrow with some text on it. Something similar to what \xrightarrow command produces but with wiggly arrows as in \rightsquigarrow. The length of the arrow should automatically be adjusted to fit the text above it and I do not know how to handle this part in TikZ. Any ideas would be much appreciated. Integral of $\frac{1}{x^4+1}$ Just doing this for revision, seems much harder than it should be, should I use $x=\tan u$ ? Any help appreciated. When one hears that something smells, one would generally assume that it smells bad.   Isn't there a word which wouldn't bring to mind the idea of a bad odor? For example, how would you describe pot-pourri (assuming you like the smell of pot-pourri)? If possible, I would like an adjective, or a word that could takes the place of an adjective. How to attach my repo to heroku app Can a class overload methods that also exist in the publicly inherited interface? It seems like this is unambiguous and useful, but compilers (VC, Intel, GCC) all complain, at least by my construction. Below is a toy example. The inherited rebound() function has two clear overloads, yet this will not compile.  If you rename the rebound() method in either class, it works fine, but if they share the same member function name (even though they're overloaded with different argument types!) you get a fatal error of "too few arguments to function call."  The workaround is trivial (I'll just rename the methods) but I'm just trying to understand if this is a C++ restriction (and why it would be).   #include  class Bound { public:   Bound() : x0(0.0), x1(0.0) {};   Bound(double x) : x0(x), x1(x) {};   double width() const {return x1-x0;}   void rebound(const Bound *a, const Bound *b); private:   double x0, x1; };  void Bound::rebound(const Bound *a, const Bound *b) {   if (a && b) {     x0=std::min(a->x0, b->x0);     x1=std::max(a->x1, b->x1);   } }  class Node : public Bound { public:   Node(double x) : Bound(x), left(0), right(0) {};   Node(Node *a, Node *b) : left(a), right(b) {rebound();}   void rebound() { rebound(left, right); } private:   Node *left;   Node *right; };   int main() {   Node A(1.0);   Node B(2.0);   Node C(&A, &B); } My 1.12 solution can be found . When trying to update command blocks to 1.13, I have the following:  scoreboard objectives add invert dummy   (run at start) then:  scoreboard players set FakePlayer invert 1   (impulse unconditional repeat) chained into:  execute at @e[tag=summoned] run scoreboard players reset FakePlayer invert   (chain unconditional repeat) chained into:  execute if score FakePlayer invert = 1 invert run say "All summoned animals are dead!"   This should reset FakePlayers score continuously until all entities with tag "summoned" are dead, then it should run the final condition. This does not happen, and I can't see why. Similar matrices and field extensions Should the user be forced to sign in for a wish list on an ecommerce site? I believe that signing into a site can be a big barrier to users so prefere e-commerce sites that offer guest access.  The question is should wishlists be a guest feature or do the business advantages enforcing the user to sign up outweigh the potential increases in profits.   Does anyone have any research or views on this? For some reason, the profile-hover view thingy is not loading at all(on Stackoverflow). I initially thought that it might be because of , but its been closed with the status, no-repro. Also, this is now persisting for the past 1 hour for me.  I tried to clear the cache and stuffs but nothing seems to be working, as the hover view is still not loading. Is this some sort of  or an issue with the browser? I'm using Firefox 25.0.1 on Win7 Pro(x86) machine. Here is a snapshot of it. Why must a computer have a BIOS? The  software is built into the PC, and is the first code run by a   PC when powered on ('boot firmware'). When the PC starts up, the first   job for the BIOS is the power-on self-test, which initializes and   identifies system devices such as the CPU, RAM, video display card,   keyboard and mouse, hard disk drive, optical disc drive and other   hardware. The BIOS then locates boot loader software held on a   peripheral device (designated as a 'boot device'), such as a hard disk   or a CD/DVD, and loads and executes that software, giving it control   of the PC.[2] This process is known as booting, or booting up, which   is short for bootstrapping.   Which requisites determine that a computer system must have a BIOS installed on it?  Why can't the Operational System actually do all of the BIOS work? "happen to be" and "happen to have" - expressions of probability? Based on Logman dictionary:       happen to do something: if you happen to do something, you do it by chance.   for example take a look at these examples:     They happen to be unemployed at the time. I happen to have a degree in computer science.    So based on the definition of the happen to do something, first one means they are probably unemployed at the time. and the second one means I probably have a degree in computer science.     Am I right? Question about arithmetic–geometric mean We have two sequences: $$a_{n+1}=\sqrt{a_nb_n}$$ $$b_{n+1}=\frac{a_n+b_n}{2}$$ I need to prove that those are making Cantor's Lemma.(At the end I shold get that: $\lim_{n\to \infty}a_n=\lim_{n\to \infty}b_n$ by Cantor's Lemma)  Any ideas how?  Thank you. I installed the  on my Ubuntu&nbsp;11.04 (Natty Narwhal) with   sudo apt-get install lamp-server^   Now I navigate to /var/www and use   wget http://ftp.drupal.org/files/projects/drupal-7.x-dev.tar.gz   I get the following error.   --2011-08-03 13:59:00--   http://ftp.drupal.org/files/projects/drupal-7.x-dev.tar.gz Resolving  ftp.drupal.org... 64.50.233.100, 64.50.236.52 Connecting to  ftp.drupal.org|64.50.233.100|:80... connected. HTTP request sent,  awaiting response... 200 OK Length: 2757101 (2.6M)  [application/x-gzip] drupal-7.x-dev.tar.gz: Permission denied   Cannot write to `drupal-7.x-dev.tar.gz' (Permission denied).   How do I resolve this error?  I tried to download the same file in the downloads folder, and it went on without an issue. So it seems to be some permission error, but I'm not sure about that or how to solve it.