Search Results

Search found 3176 results on 128 pages for 'parsing'.

Page 50/128 | < Previous Page | 46 47 48 49 50 51 52 53 54 55 56 57  | Next Page >

  • How can I get an e-mail address out of a string of key=value pairs?

    - by noob
    How can I get some part of string that I need? accountid=xxxxxx type=prem servertime=1256876305 addtime=1185548735 validuntil=1265012019 username=noob directstart=1 protectfiles=0 rsantihack=1 plustrafficmode=1 mirrors= jsconfig=1 [email protected] lots=0 fpoints=6076 ppoints=149 curfiles=38 curspace=3100655714 bodkb=60000000 premkbleft=25000000 ppointrate=116 I want data after email= but up to live.com.?

    Read the article

  • issue with $.ParseJSON which converts json string to null

    - by Aby
    I am using spring mvc in which i convert the arraylist into json string. I have one object 1) results. My output from spring looks like this: { "data":"[{\"userName\":\"test1\",\"firstName\":\"test\",\"lastName\":\"user\"}, {\"userName\":\"test2\",\"firstName\":\"test1\",\"lastName\":\"user1\"}]", } I get output as null when i do '$.parseJSON' with this output. When i tried testing only with data object it works fine Any help would be great.

    Read the article

  • jQuery display text nested in paragraphs inside a div

    - by user961627
    I have HTML that looks something like this: <div class='textbox' data-title='Sometitle'> <div class='textareaedit'> <p><strong>Test sample text</strong></p> </div> </div> I'm sometimes going to have a few different <p> tags inside the textareaedit divs, and sometimes strong tags around the text inside the <p> (as in this example), and sometimes a span tag, and sometimes it's going to be without further tags inside the <p>. I want to iterate through each textbox on my page, grab its title and also the text nested inside <p> tags in textareaedit. I'm giving the output via console for testing. This is my jQuery code, but I get no output for the second console.log() line: $('.textbox').each(function() { $this = $(this); console.log($this.attr('data-title')+ ":\n"); $this.children('textareadit').children('p').each(function(){ console.log($(this).html()); // not giving any output, it's blank }); }); I tried $(this).text() as well, but no difference. You may think this example has the sample text inside <strong> tags within the <p>, but I've also tried the same example without the strong, where the text was the direct child of <p>, but it didn't make a difference. How can I capture the text?

    Read the article

  • python regex for repeating string

    - by Lars Nordin
    I am wanting to verify and then parse this string (in quotes): string = "start: c12354, c3456, 34526;" //Note that some codes begin with 'c' I would like to verify that the string starts with 'start:' and ends with ';' Afterward, I would like to have a regex parse out the strings. I tried the following python re code: regx = r"V1 OIDs: (c?[0-9]+,?)+;" reg = re.compile(regx) matched = reg.search(string) print ' matched.groups()', matched.groups() I have tried different variations but I can either get the first or the last code but not a list of all three. Or should I abandon using a regex?

    Read the article

  • parse more items

    - by user449891
    Currently I'm using zRSSFeed to parse a Menalto Gallery2 RSS feed, and only get about 5 details: link, description, title, etc. There are about 11 items within the tag. How can I get zRSSFeed to return all of them, including <media:thumbnail url="http..."> which includes a colon? Code from ZRSSFeed var html='';var row='odd';var xml=getXMLDocument(data.xmlString);var xmlEntries=xml.getElementsByTagName('item'); //if(options.header)html+='<div class="rssHeader">'+'<a href="'+feeds.link+'" title="'+feeds.description+'">'+feeds.title+'</a>'+'</div>'; //html+='<div class="rssBody">'+'<ul>';for(var i=0;i<feeds.entries.length;i++){ html+='<div class="rssBody">';for(var i=0;i<feeds.entries.length;i++){ var entry=feeds.entries[i];var entryDate=new Date(entry.publishedDate);var pubDate=entryDate.toLocaleDateString()+' '+entryDate.toLocaleTimeString(); //html+='<li class="rssRow '+row+'">' html+='<div>' //if(options.date)html+='<div>'+pubDate+'</div>' if(options.content){ //if(options.snippet&&entry.contentSnippet!=''){ //var content=entry.contentSnippet; //}else{ var content=entry.content; sq_arr = content.split('>'); sq_brr = sq_arr[0].split('?'); sq_crr = sq_arr[1].split(' width'); sq_drr = sq_crr[0].split('src'); sq_b = new RegExp(/\d+(?=\")/g).exec(sq_drr[1]); sq_c = sq_b*1-1; sq_rplc = sq_brr[1].replace(/\d+(?=\")/g, sq_c); sq_str = sq_brr[0] + '?g2_view=core.DownloadItem&' + sq_rplc + '>' + sq_crr[0] +'" height="75" width="75"></a>'; content = sq_str.r`enter code here`eplace(/&amp;/g, '&'); //} //html+='<p>'+content+'</p>' html+=content //html+='<'+options.titletag+'><a href="'+entry.link+'" title="View this feed at '+feeds.title+'" target="'+options.linktarget+'">'+entry.title+'</a></'+options.titletag+'>' } (A more human readable version -- cwallenpoole) var html=''; var row='odd'; var xml=getXMLDocument(data.xmlString); var xmlEntries=xml.getElementsByTagName('item'); html+='<div class="rssBody">'; for(var i=0;i<feeds.entries.length;i++){ var entry=feeds.entries[i]; var entryDate=new Date(entry.publishedDate); var pubDate=entryDate.toLocaleDateString()+' '+entryDate.toLocaleTimeString(); html+='<div>' if(options.content){ var content=entry.content; sq_arr = content.split('>'); sq_brr = sq_arr[0].split('?'); sq_crr = sq_arr[1].split(' width'); sq_drr = sq_crr[0].split('src'); sq_b = new RegExp(/\d+(?=\")/g).exec(sq_drr[1]); sq_c = sq_b-1; sq_rplc = sq_brr[1].replace(/\d+(?=\")/g, sq_c); sq_str = sq_brr[0] + '?g2_view=core.DownloadItem&' + sq_rplc + '>' + sq_crr[0] +'" height="75" width="75"></a>'; content = sq_str.r`enter code here`eplace(/&amp;/g, '&'); html+=content } // missing }???

    Read the article

  • Is there a PDF parser for PHP?

    - by elviejo
    Hi I know about several PDF Generators for php (fpdf, dompdf, etc.) What I want to know is about a parser. For reasons beyond my control, certain information I need is only in a table inside a pdf and I need to extract that table and convert it to an array. Any suggestions?

    Read the article

  • What sort of object is this and how to use it?

    - by Gary
    What would be the correct name for this type of array? There are 3 main sections and 4 sub-parts consisting of "issuedTime" "text" "url" and "validToTime", how do you start to convert this to an object? If there was only 1 main section, it would be fairly simple to do however with 3 main parts and no identification for each main section has me scratching my head as where to start. Any advise appreciated. [{ "issuedTime":"7:13pm Sunday 13 June 2010", "text":"\nAmended 7:10pm.\n\nText text and more text\n", "url":"\/folder\/fc\/name.png", "validToTime":"12:00am Monday 14 June 2010" },{ "issuedTime":"8:33pm Sunday 13 June 2010", "text":"\nText and more text.\n", "url":"\/folder\/fc\/name.png", "validToTime":"12:00pm Monday 14 June 2010" },{ "issuedTime":"10:40am Sunday 13 June 2010", "text":"\nAnd even more text.", "url":"\/folder\/fc\/name.png", "validToTime":"12:00am Tuesday 15 June 2010" } ]

    Read the article

  • how to detect escape characters in a string

    - by mix
    Given a string named line whose raw version has this value: \rRAWSTRING how can I detect if it has the escape character \r? What I've tried is: if repr(line).startswith('\r'): blah... but it doesn't catch it. I also tried find, such as: if repr(line).find('\r') != -1: blah doesn't work either. What am I missing? thx!

    Read the article

  • Using beautifulsoup to extract text between line breaks (e.g. <br /> tags)

    - by Michael Altman
    I have the following HTML that is within a larger document <br /> Important Text 1 <br /> <br /> Not Important Text <br /> Important Text 2 <br /> Important Text 3 <br /> <br /> Non Important Text <br /> Important Text 4 <br /> I'm currently using BeautifulSoup to obtain other elements within the HTML, but I have not been able to find a way to get the important lines of text between <br /> tags. I can isolate and navigate to each of the <br /> elements, but can't find a way to get the text in between. Any help would be greatly appreciated. Thanks.

    Read the article

  • How Does Facebook Know What Image To Parse Out of An Article?

    - by Travis
    First off I want to say that I wasn't really sure where to post this but it is very much programming related. If it is in the wrong spot I apologize and please let me know where I should post it instead. When sharing an article on a friends wall, facebook will grab a thumbnail of the article. How do they always get the right thumbnail from articles? It doesn't grab the logo img element of of http://www.nytimes.com/2010/06/07/world/asia/07convoys.html?hp for example but rather grabs the correct image element that corresponds with the article. I'm looking to do something similar and was wondering of a good way to parse the html to find the image given this example. Thanks.

    Read the article

  • How Do You Parse Column Data ?

    - by discwiz
    I am trying to parse a file generated by LGA Tracon that lists the position data for aircraft over a given time frame. The data of interest starts with TRACKING DATA and ends with SST and there are thousands of entries per file. The system generating the file, Common ARTS, is very rigid in its formatting and we can expect the column spacing to be consistent. Any help would be greatly appreciated. Thanks, Here is an image to preserve the exact formatting Here is a reduced text file. link text

    Read the article

  • Best tools to parse reports

    - by Andy Schaefer
    I have a report that I need to parse/scrape for loading into an alternate or query-able data store. The report looks like something akin to: this. My gut is that PERL would do a decent job, but I have several different permutations of the report and I don't really want to make a script around each form. This report is a pretty stock type report, and I have seen where Monarch Pro can parse these types of reports, but I have had a difficult time finding alternatives to how these could be parsed since I'm looking to do this working primarily in a Linux environment. Any suggestions?

    Read the article

  • Relative Dates with Datejs

    - by Prasanna
    I have a requirement where in, I have to parse the dates relative to a date object returned from the server side. But the datejs library always considers only the browsers date object. The situation is something like this: The server gives back the date in PST and the browser is in IST. And all the inputs are getting parsed with respect to the current date in IST instead of current date in PST. Is there any way I could resolve this. Or could you suggest any workarounds. Thanks in advance.

    Read the article

  • Python/YACC Lexer: Token priority?

    - by Rosarch
    I'm trying to use reserved words in my grammar: reserved = { 'if' : 'IF', 'then' : 'THEN', 'else' : 'ELSE', 'while' : 'WHILE', } tokens = [ 'DEPT_CODE', 'COURSE_NUMBER', 'OR_CONJ', 'ID', ] + list(reserved.values()) t_DEPT_CODE = r'[A-Z]{2,}' t_COURSE_NUMBER = r'[0-9]{4}' t_OR_CONJ = r'or' t_ignore = ' \t' def t_ID(t): r'[a-zA-Z_][a-zA-Z_0-9]*' if t.value in reserved.values(): t.type = reserved[t.value] return t return None However, the t_ID rule somehow swallows up DEPT_CODE and OR_CONJ. How can I get around this? I'd like those two to take higher precedence than the reserved words.

    Read the article

  • removing phone number from a document.

    - by Grant Collins
    Hi, I've got a challenge that I am hoping that the SO community is able to help me with. I trying to parse a lot of html documents in my PHP application to remove personal details, such as names, addresses and phone numbers. I can remove most of these details without too much trouble, however the phone number is a real problem for me. My idea is to take the text from these documents and the use a regex to identify the phone numbers and replace them with another value such as 'xxxx'. I've got 2 regex that I am using one for UK landline numbers and one for UK cell/mobile numbers. However when I try and run them against the text it just returns an empty string. I am using the following preg_replace code: $pattens = array( '/^(((\+44\s?\d{4}|\(?0\d{4}\)?)\s?\d{3}\s?\d{3})|((\+44\s?\d{3}|\(?0\d{3}\)?)\s?\d{3}\s?\d{4})|((\+44\s?\d{2}|\(?0\d{2}\)?)\s?\d{4}\s?\d{4}))(\s?\#(\d{4}|\d{3}))?$/', '/^(\+44\s?7\d{3}|\(?07\d{3}\)?)\s?\d{3}\s?\d{3}$/' ); $replace = array('xxxxx', 'xxxxx'); //do the search for the numbers. $updatedContents = preg_replace($pattens, $replace, $htmlContents); At the moment this is causing me a lot of head scratching as I thought that I had this nailed, but at the moment I can't see what's wrong?? I am sure that it is something really simple. Thanks, Grant

    Read the article

  • How should I parse this simple text file in Java?

    - by Winston
    I have a text file that looks like this: grn129 agri- ac-214 ahss hud114 ahss lov1150 ahss lov1160 ahss lov1170 ahss lov1210 ahss What is the best way to parse this file using Java if I want to create a HashMap with the first column as the key and the second column as the value. Should I use the Scanner class? Try to read in the whole file as a string and split it? What is the best way?

    Read the article

  • urllib alternative for iPhone

    - by Pr301
    hi, I am trying to create an iPhone application which in some point connects to the internet, fills an on-line form, fetches the resulting website, parses it and returns a string to the user. I want all this process to happen in the background. I know how to do this kind of things with python and urllib but in objc I can't find an alternative, from on-line search I found either sites that explain how to use webkit to retrieve webpages (I suppose this is for displaying them to the user) or how to parse an existing HTML file or string. Since I want the file to be retrieved from the internet and the whole process should be running in the background, neither of these solutions covers my needs.

    Read the article

  • how to parse google search results on iphone

    - by Shibin Moideen
    Hi satckoverflow, I am trying to implement a search tool on my iPhone, when i enter a text it will be send to the google for searching. and return the result. I need to know how the text is given to the Google search engine and how the google is returning the result? Is it in the XML format or JSON. I can then parse the result XML/JSON on my iPhone and want to display the results in my table view. Any idea? need Help...! Thanks in advance, Shibin

    Read the article

  • BigInteger.Parse() on hexadecimal number gives negative numbers.

    - by brickner
    I've started using .NET 4 System.Numerics.BigInteger Structure and I've encountered a problem. I'm trying to parse a string that contains a hexadecimal number with no sign (positive). I'm getting a negative number. For example, I do the following two asserts: Assert.IsTrue(System.Int64.Parse("8", NumberStyles.HexNumber, CultureInfo.InvariantCulture) > 0, "Int64"); Assert.IsTrue(System.Numerics.BigInteger.Parse("8", NumberStyles.HexNumber, CultureInfo.InvariantCulture) > 0, "BigInteger"); The first assert succeeds, the second assert fails. I actually get -8 instead of 8 in the BigInteger. The problem seems to be when I'm the hexadecimal starts with 1 bit and not 0 bit (a digit between 8 and F inclusive). If I add a leading 0, everything works perfectly. Is that a bad usage on my part? Is it a bug in BigInteger?

    Read the article

  • How to read from an XmlReader without moving it forwards

    - by andy
    hey guys, I've got this scenario: while (reader.Read()) { if (reader.NodeType == XmlNodeType.Element && reader.Name == itemElementName) { XElement item = null; try { item = XElement.ReadFrom(reader) as XElement; } catch (XmlException ex) { //log line number and stuff from XmlException class } } } In the above loop I'm transforming a certain node (itemElementName) into an XElement. Some nodes will be good XML and will go into an XElement, however, some will not. In the CATCH, I'd like to now only catch the standard XmlException stuff... I'd also like to catch an extract of the current Xml and a string. However, if I do any kind of READ operation on the node before I pass it to the XElement, it moves the reader forward. How can get a "snapshot" of the contents of the OuterXml of the reader without interfering with it's position?

    Read the article

  • JSON parse data in javascript from php

    - by Stefania
    I'm trying to retrieve data in a javascript file from a php file using json. $items = array(); while($r = mysql_fetch_array($result)) { $rows = array( "id_locale" => $r['id_locale'], "latitudine" => $r['lat'], "longitudine" => $r['lng'] ); array_push($items, array("item" => $rows)); } ECHO json_encode($items); and in the javascript file I try to recover the data using an ajax call: $.ajax({ type:"POST", url:"Locali.php", success:function(data){ alert("1"); //var obj = jQuery.parseJSON(idata); var json = JSON.parse(data); alert("2"); for (var i=0; i<json.length; i++) { point = new google.maps.LatLng(json[i].item.latitudine,json[i].item.longitudine); alert(point); } } }) The first alert is printed, the latter does not, it gives me error: Unexpected token <.... but I do not understand what it is. Anyone have any idea where am I wrong? I also tried to recover the data with jquery but with no positive results.

    Read the article

< Previous Page | 46 47 48 49 50 51 52 53 54 55 56 57  | Next Page >