I am new to Python and I am struggling a bit with regular expressions. If I have an input like this:      text = &lt;tag&gt;xyz&lt;/tag&gt;\n&lt;tag&gt;abc&lt;/tag&gt;   Is it possible to get an output list with elements like:      matches = ['&lt;tag&gt;xyz&lt;/tag&gt;','&lt;tag&gt;abc&lt;/tag&gt;]   Right now I am using the following regex      matches = re.findall(r"&lt;tag&gt;[\w\W]*&lt;/tag&gt;", text)   But instead of a list with two elements I am getting only one element with the whole input string like:      matches = ['&lt;tag&gt;xyz&lt;/tag&gt;\n&lt;tag&gt;abc&lt;/tag&gt;']   Could someone please guide me? Thank you.
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 do suggested edits work? When clicking &quot;edit&quot; I see:  Your edit will be placed in a queue until it is peer reviewed. We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.  Like:     Likewise, when I am not logged in, clicking &quot;improve this question&quot; or &quot;improve this answer&quot; shows:  You are not . Your edit will be placed in a queue until it is .  And when I click 'Save', I get:  Thanks for submitting an edit. It is only visible to you until it's been approved by trusted community members  Like:     Who can suggest an edit? Where do suggested edits go? Who can vote on a suggested edit? How do suggested edits get reviewed? Can I earn reputation? What about abuse or bad edits? Sometimes the Community user approves or rejects my edit. Why is that? When can I not suggest an edit? Is there a minimum change requirement for a suggested edit? How do I check my suggested edit history? I disagree with the reasons why my suggested edit was rejected. What can I do? How do I know whether there are edits waiting for review? Someone suggested an edit to my own post, and the reviewers took the wrong action. What can I do? Are tag wikis included in this scheme? What do the &quot;Improve Edit&quot; and &quot;Reject and Edit&quot; buttons do? Why are apparently valid links to rejected edits resulting in 404 errors?   For more information about editing, see &quot;&quot; in the . Disable ClearType (blurry fonts) in Internet Explorer 10 on windows 7 I've installed recently the latest Internet Explorer 10 and found out again what was my issue with the previous upgrade -- blurry fonts aka ClearType! Unfortunately there are some apps that use IE engine and thus all content there is blurry too :/  I know about  but unfortunately it seems that it is only for IE9. Is there any other solution to disable CT in IE10?  (and for clarity - I don't like CT, I've tried tweaking it but for me it's just blurry and case pain in my eyes no matter what I do... it's probably related to the low dpi of my monitor) When to use an object pronoun or a possessive adjective before a gerund The rule says that we can use a possessive adjective or an object pronoun before a gerund. Is there a rule  that says when to use each or are they interchangeable? Some say that it's wrong to use an object pronoun before a gerund. Is there a way to programmatically change the screen resolution or enable/disable multiple monitors in Windows XP?  For example to change from 1024x768 with one monitor to 1280x104 on two monitors?  I would be most interested in a win32 function to do this but anything that can be tied to a windows shortcut would suffice. This is probably a dumb question. I guess what I'm trying to ask is if radio waves travel the same speed as gamma rays, how do gamma photons carry more energy than radio photons? Do they spin faster? What other energy sources could they carry if they are moving the same speed through space? Standard example where Jacobson radical not equal nilradical Is there a standard example in commutative algebra of a ring where the jacobson radical does not equal the nilradical? Options for crowdsourcing GIS data? I am looking at collecting spatial information from a range of stakeholders to identify opportunities within a landscape.  However, the data that we are collecting are not presently mapped and so we wish to use an interactive method to get this information onto a map.  Which online websites/methods would people recommend for circulating to a non-technical audience to try and get them to map what they know?    Where the emphasis is on ease of use by the stakeholder. Find the value of a given integral sequence: $I_n=\int_{0}^{1}(1-x^2)^ndx$ Let $(I_n)_{n \geq 1}$ be a sequence such that: $$I_n = \int_0^1 (1-x^2)^n dx$$  Find the value of $I_n$ (The solution is $\frac{2}{3} \cdot \frac{4}{5} \cdot ... \cdot \frac{2n}{2n+1}$).  I've tried using the binomial expansion of $(1-x^2)^n$ but I couldn't get the proper answer.  Thank you! Attribute field names truncation when creating shapefiles I am wondering what is the expression that truncate a given name to the 10 characters name used in ESRI shapefiles when an object is saved as shapefile with the function writeOGR in R. For example, the attribute field from a spatial dataframe "Ablepharus kitaibelii" is converted to "Ablphrk" when saved as shapefile, how the truncation is done? Microsoft has steadily improved its operating cash flows in the past three years. Microsoft has steadily improved its operating cash flows in the last three years. Microsoft has steadily improved its operating cash flows for the past three years. Microsoft has steadily improved its operating cash flows for the last three years. Microsoft has steadily improved its operating cash flows for the past three years. (&quot;for&quot; omitted) Microsoft has steadily improved its operating cash flows for the last three years. (&quot;for&quot; omitted) Microsoft has steadily improved its operating cash flows during the past three years. Microsoft has steadily improved its operating cash flows during the last three years. Microsoft has steadily improved its operating cash flows over the past three years. Microsoft has steadily improved its operating cash flows over the last three years.  Which of them are idiomatic and preferred? Are they interchangeable? I am aware that, to use a Spell Scroll, you must have the related spell on (at least one of) your spell list(s). Then, if you have the spell slot to cast it, you succeed automatically; else, you must make an ability check in order to cast it (failure resulting in the scroll being wasted).  Consider this example : A Cleric 5 / Wizard 4 finds a Raise Dead Spell Scroll. The spell is on the Cleric List, but is a fifth level spell. Considering that the cleric-wizard has fifth level slots, but can only pick up to third level cleric spells, would he have to make the ability check to successfully cast the Raise Dead in the Spell Scroll, or would he succeed automatically ? If the series $\sum_0^\infty a_n$ converges, then so does $\sum_1^\infty \frac{\sqrt{a_n}}{n} $ Problem:      Suppose that for every $n\in\mathbb{N}$, $a_n\in\mathbb{R}$ and $a_n\ge 0$. Given that   $$\sum_0^\infty a_n$$   converges, show that    $$\sum_1^\infty \frac{\sqrt{a_n}}{n} $$   converges.   Source: Rudin, Principles of Mathematical Analysis, Chapter 3, Exercise 7. RegEx: Grabbing values between quotation marks I have a value like this:  "Foo Bar" "Another Value" something else   What regex will return the values enclosed in the quotation marks (e.g. Foo Bar and Another Value)? Proving ${n \choose p} \equiv \Bigl[\frac{n}{p}\Bigr] \ (\text{mod} \ p)$ How to toggle background image on button click? How can I search for one label but not another? What search query will return conversations that have the label Reading but not the label Ignore?  I've tried using label:reading -label:ignore but Gmail still returns conversations that have the label Ignore:    The query label:(reading -ignore) gives me the same results. Add an image to an object I want to put a 2D image on a 3D object in Blender. How do I do that?  I have found the "textures" tab in the "properties" window, but I can't figure out what to do with it.  Preferably, I would like to click and drag an image off my desktop right onto the object. The energy of an electromagnetic wave The intensity of an electromagnetic wave is only related to its amplitude $E^2$ and not its frequency. A photon has the same wavelength as the wave that's carrying it, and its energy is $h  f$.   So if a laser wave is kept at the same amplitude and the wave length is reduced, why does its intensity remain the same even though its photons now carry less energy?  Why are the intensities of electromagnetic waves so different to sound waves (and other waves travelling through a medium) which are related to $f^2  E^2$? Is there an easy way to see associativity or non-associativity from an operation's table? Most properties of a single binary operation can be easily read of from the operation's table. For example, given $$\begin{array}{c|ccccc} \cdot &amp; a &amp; b &amp; c &amp; d &amp; e\\\hline a     &amp; e &amp; d &amp; b &amp; a &amp; c\\ b     &amp; d &amp; c &amp; e &amp; b &amp; a\\ c     &amp; b &amp; e &amp; a &amp; c &amp; d\\ d     &amp; a &amp; b &amp; c &amp; d &amp; e\\ e     &amp; c &amp; a &amp; d &amp; e &amp; b \end{array}$$ it is easy to check that it is closed (no elements occur in the table which don't occur as row or column index), commutative (the table is symmetric), has a neutral element (the row and column of $d$ are copies of the index row/column), and has an inverse element for each element (there's a $d$ in each row and column). In other words, almost all important properties can immediately be seen. The only part missing is associativity.  Therefore my question: Is there a simple way to see directly from the operation's table (i.e. without doing explicitly all the calculations) if an operation is associative? Does Change Data Capture (CDC) work in a SQL Server 2012 AlwaysOn Failover Cluster Instances setup? Does  work in a  setup?  There would be two nodes in the AlwaysOn Failover Cluster Instances setup and two Domain Controllers.  We are not using AlwaysOn Availability Groups.  Will CDC work? and will it failover?