If I have this text blob  "merchants":[{"name":"Berlins - Venice","description":"LA\'s Most   Authentic German Döner Experience.","should_show_ajax_etas":true,"id":3916 ,"fulfillment_types_allowed":["DELIVERY"],,"name":"Clutch CaliMex", "description":"Northern Mexican Cuisine."name":"LocaliVenice", "description":"If 7-Eleven and Whole Foods Had A Love  Child...","should_show_ajax_etas":true,"id":1743   I am trying to parse the name value between the quotes. So in case, I am trying to return Berlins - Venice, Clutch CaliMex, and LocaliVenice. This is the regex that I am using on   regex = re.compile(r'?&lt;=\"name\":\")(.*)(?=\"description\"').   which is mostly inspired by   However, it appears to return EVERYTHING from Berlins to the very last instance of description even though there are two more instances of description in the text blob.  Berlins - Venice","description"..(truncated).."name":"Locali Venice",   Again, I only need the name of the restaurants in between the quotes
3211
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}?
92412
I have an array of 1000 or so entries, with examples below:  wickedweather liquidweather driveourtrucks gocompact slimprojector   I would like to be able to split these into their respective words, as:  wicked weather liquid weather drive our trucks go compact slim projector   I was hoping a regular expression my do the trick.  But, since there is no boundary to stop on, nor is there any sort of capitalization that I could possibly key on, I am thinking, that some sort of reference to a dictionary might be necessary?    I suppose it could be done by hand, but why - when it can be done with code! =)  But this has stumped me.  Any ideas?
108524
I need a RegEx pattern for extracting all the properties of an image tag.  As we all know, there are lots of malformed HTML out there, so the pattern has to cover those possibilities.  I was looking at this solution  but it didn't quite get it all:  I come up something like:  (alt|title|src|height|width)\s*=\s*["'][\W\w]+?["']   Is there any possibilities I'll be missing or a more efficient simple pattern?  EDIT: Sorry, I will be more specific, I'm doing this using .NET so it's on the server side. I've already a list of img tags, now I just need to parse the properties.
72828
Is there a way to use newcommand or some other nice technique to transform any occurence of  "bla"   in math mode into  \text{bla}   The reason I ask is because it is easy, and doesn't interrupt the flow of reading the (La)TeX code as much.  I would like to keep Xe(La)TeX's nice quote behavior (ie it can use the regular "" instead of backticks to quote some text outside math mode).
111517
I need to find all occurrences of AAsomeArbitraryStringBB and replace it with CCsomeArbitraryStringDD.  So  AAHelloBB Text AAByeByeBB   becomes  CCHelloDD Text CCByeByeDD.   It's important to note that the replacement string contains part of the search string.
69562
I've been retagging posts matching [special] -character -[character] is:question  The sidebar gives this helpful description of my query:     results found not containing   and not containing   tagged with       not       search options   questions only   It looks like there are some words missing there...
62985
I have the following data:  http://example1.com    anchor text 1     http://example2.com    anchor text 2 http://example3.com    anchor text 3       And I would like the output to be:  http://example1.com    anchor text 1    &lt;a href="http://example1.com"&gt;anchor text 1&lt;/a&gt; http://example2.com    anchor text 2    &lt;a href="http://example1.com"&gt;anchor text 2&lt;/a&gt; http://example3.com    anchor text 3    &lt;a href="http://example1.com"&gt;anchor text 3&lt;/a&gt;   I have tried getting the code to substitute cells A1 and B1 in cell C1 like this:  ="&lt;a href="A1"&gt;B1&lt;/a&gt;"   However, I'm getting errors because of the equal sign and double quotes in the HTML code. I have tried using single quotes to escape it, but still no luck.  Anyone know how to do this? Your help is highly appreciated.
114561
Could I get an example as to how these three elements (are these called metacharacters?) differ?  I know that * means all or nothing, but I am not sure if it's the right way to think about it. On the other hand . and ? seem the same. They match one character, right?
33951
Im trying to craft a regex that only returns &lt;link&gt; tag hrefs  Why does this regex return all hrefs including &lt;a hrefs?       (?&lt;=&lt;link\s+.*?)href\s*=\s*[\'\"][^\'\"]+        &lt;link rel="stylesheet" rev="stylesheet"      href="idlecore-tidied.css?T_2_5_0_228" media="screen">     &lt;a href="anotherurl">Slash Boxes&lt;/a>   thank you
1735
In order to store results in the newly released (Winter 16') Platform Cache, I need an alphanumeric string, but currently have a String with the report name that I'm attempting to store, some of which have spaces, hyphens, parenthesis, etc. (i.e. "Sales - Actual Results (TY)").  I'm not sure in APEX how I would strip all these unwanted characters from the string to convert it into the alphanumeric key that I need.  Please &amp; Thank you!
49879
Currently when you search for a combination of tags in localized Stack Overflow you get some text in English. For example in Stack Overflow en español:       Etiquetadas con [python] or [php]        Etiquetadas con [python-3.x] not [python] not [bla]   Same in SOru:     С метками: [python-3.x] not [python] not [bla]   Looking for the text in traducir.win I could not find it, so I assume it is somehow hardcoded. Could you include it in Transifex?
57802
I have a regex created from a list in a database to match names for types of buildings in a game. The problem is typos, sometimes those writing instructions for their team in the game will misspell a building name and obviously the regex will then not pick it up (i.e. spelling "University" and "Unversity").  Are there any suggestions on making a regex match misspellings of 1 or 2 letters?  The regex is dynamically generated and run on a local machine that's able to handle a lot more load so I have as a last resort to algorithmically create versions of each word with a letter missing and then another with letters added in.  I'm using PHP but I'd hope that any solution to this issue would not be PHP specific.
70124
Using regular expressions, what is the simplest way to fetch a websites HTML and find the value inside this tag (or any attribute's value for that matter):  &lt;html&gt;   &lt;head&gt;   [snip]   &lt;meta name="generator" value="thevalue i'm looking for" /&gt;   [snip]
33382
Can a regular expression match whitespace or the start of a string?  I'm trying to replace currency the abbreviation GBP with a £ symbol. I could just match anything starting GBP, but I'd like to be a bit more conservative, and look for certain delimiters around it.  &gt;&gt;&gt; import re &gt;&gt;&gt; text = u'GBP 5 Off when you spend GBP75.00'  &gt;&gt;&gt; re.sub(ur'GBP([\W\d])', ur'£\g&lt;1&gt;', text) # matches GBP with any prefix u'\xa3 5 Off when you spend \xa375.00'  &gt;&gt;&gt; re.sub(ur'^GBP([\W\d])', ur'£\g&lt;1&gt;', text) # matches at start only u'\xa3 5 Off when you spend GBP75.00'  &gt;&gt;&gt; re.sub(ur'(\W)GBP([\W\d])', ur'\g&lt;1&gt;£\g&lt;2&gt;', text) # matches whitespace prefix only u'GBP 5 Off when you spend \xa375.00'   Can I do both of the latter examples at the same time?
111187
If I'm trying to match a quote-delimited string with a regex, which of the following is "better" (where "better" means both more efficient and less likely to do something unexpected):  /"[^"]+"/ # match quote, then everything that's not a quote, then a quote   or  /".+?"/   # match quote, then *anything* (non-greedy), then a quote   Assume for this question that empty strings (i.e. "") are not an issue. It seems to me (no regex newbie, but certainly no expert) that these will be equivalent.   Update: Upon reflection, I think changing the + characters to * will handle empty strings correctly anyway.
112080
I'm looking for the ultimate postal code and zip code regex. I'm looking for something that will cover most (hopefully all) of the world.
3154
I have a string User name (sales) and I want to extract the text between the brackets, how would I do this?   I suspect sub-string but I can't work out how to read until the closing bracket, the length of text will vary.