<HTML dir=ltr><HEAD>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<STYLE>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</STYLE>
<META content="MSHTML 6.00.6001.18203" name=GENERATOR></HEAD>
<BODY class=hmmessage>
<DIV id=idOWAReplyText87628 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>If you want to jpeg path</FONT></DIV>
<DIV dir=ltr><FONT face=Arial></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial>it would be something near </FONT></DIV>
<DIV dir=ltr><FONT face=Arial></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial>var reg = new regExp;</FONT></DIV>
<DIV dir=ltr><FONT face=Arial></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial>reg = "$<FONT size=3>href="</FONT><A href="http://s3.amazonaws.com/twitter_production/profile_images/96243182/Photo14_normal.jpg"><FONT size=3><A href='http://[A-Za-z0-9]*.amazonaws.com/twitter_production/profile_images/[0-9]*/[A-Za-z0-9_-]*.jpg"/'>http://[A-Za-z0-9]*.amazonaws.com/twitter_production/profile_images/[0-9]*/[A-Za-z0-9_-]*.jpg</FONT></A><FONT size=3>"/</A>>"</FONT></FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=3></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=3>But thats not been tested.</FONT></DIV></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> xerte-bounces@lists.nottingham.ac.uk on behalf of Dave Burnett<BR><B>Sent:</B> Mon 13/04/2009 02:16<BR><B>To:</B> Xerte list<BR><B>Subject:</B> RE: [Xerte] how to strip out a specific string?<BR></FONT><BR></DIV>
<DIV><BR><BR>I could be imagining things, but I thought Julian just posted something about Regular Expressions now being supported.<BR><BR>If that is true, then this would work:<BR><BR>new_xml = replace(original_xml, /the_string_here/g, "");<BR><BR>the /g at the end if the string parameter means "global", so it would replace all the instances of that URL with "".<BR><BR>Dave<BR><BR><BR>
<HR id=stopSpelling>
From: ronm@mitchellmedia.co.uk<BR>To: xerte@lists.nottingham.ac.uk<BR>Subject: Re: [Xerte] how to strip out a specific string?<BR>Date: Sun, 12 Apr 2009 20:19:55 +0100<BR><BR>
<DIV>Cheers Dave that's very helpful - I'll give that a try.</DIV><BR>
<DIV>
<DIV>On 12 Apr 2009, at 19:35, Dave Burnett wrote:</DIV><BR class=EC_Apple-interchange-newline>
<BLOCKQUOTE><SPAN class=EC_Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate">
<DIV class=EC_hmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><BR>It actually does have a closing tag: /><BR><BR>XML shorthands the closing tag to save characters when all the info is contained in the attributes, i.e. there is no actual value between the tags.<BR><BR><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Arial,sans-serif"><name>jamesclay (James Clay)</name> //no attributes, data between tags<BR><BR><BR></SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Arial,sans-serif"><link type="text/html" rel="alternate" href="<A href="http://twitter.com/jamesclay/statuses/1483252089">http://twitter.com/jamesclay/statuses/1483252089</A>"/><BR><BR>//all data in opening tag attributes, no explicit closing tag, just /><BR><BR></SPAN><BR>So if you know the format you show below would be consistent, you could key on that "/>" as the end of the string and RFind (reverse find) back to the first "/" you hit.<BR><BR>That should isolate the actual picture name/format.<BR><BR>Dave<BR><BR><BR>
<HR id=EC_stopSpelling>
From:<SPAN class=EC_Apple-converted-space> </SPAN><A href="mailto:ronm@mitchellmedia.co.uk">ronm@mitchellmedia.co.uk</A><BR>To:<SPAN class=EC_Apple-converted-space> </SPAN><A href="mailto:xerte@lists.nottingham.ac.uk">xerte@lists.nottingham.ac.uk</A><BR>Date: Sun, 12 Apr 2009 19:22:22 +0100<BR>Subject: [Xerte] how to strip out a specific string?<BR><BR>
<DIV class=EC_EC_Section1>
<DIV>
<DIV style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 0px; MARGIN-LEFT: 0px; MARGIN-RIGHT: 0px; PADDING-TOP: 0px"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Arial,sans-serif">Hi all</SPAN></DIV>
<DIV style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 0px; MARGIN-LEFT: 0px; MARGIN-RIGHT: 0px; PADDING-TOP: 0px"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Arial,sans-serif">I've been experimenting with the new module method of creating templates and have created a couple of new templates optimised for a specific purpose which I’ll happily share with the community once complete. One is an optimised view of twitter feeds but unless I’m mistaken it seems like the xml isn't complete for some reason. I can pick up and display the text and links etc ok but I can't work out how to access the profile pics. Here's an example entry...</SPAN></DIV>
<P class=EC_EC_MsoPlainText style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 0px; MARGIN-LEFT: 0px; MARGIN-RIGHT: 0px; PADDING-TOP: 0px"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Arial,sans-serif"></SPAN> </P>
<DIV style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 0px; MARGIN-LEFT: 0px; MARGIN-RIGHT: 0px; PADDING-TOP: 0px"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Arial,sans-serif"><entry></SPAN></DIV>
<DIV style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 0px; MARGIN-LEFT: 0px; MARGIN-RIGHT: 0px; PADDING-TOP: 0px"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Arial,sans-serif"> <id>tag:search.twitter.com,2005:1483252089</id></SPAN></DIV>
<DIV style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 0px; MARGIN-LEFT: 0px; MARGIN-RIGHT: 0px; PADDING-TOP: 0px"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Arial,sans-serif"> <published>2009-04-09T12:59:26Z</published></SPAN></DIV>
<DIV style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 0px; MARGIN-LEFT: 0px; MARGIN-RIGHT: 0px; PADDING-TOP: 0px"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Arial,sans-serif"> <link type="text/html" rel="alternate" href="<A href="http://twitter.com/jamesclay/statuses/1483252089">http://twitter.com/jamesclay/statuses/1483252089</A>"/></SPAN></DIV>
<DIV style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 0px; MARGIN-LEFT: 0px; MARGIN-RIGHT: 0px; PADDING-TOP: 0px"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Arial,sans-serif"> <title>@ronm123 I meant in a browser, via a second projector probably.</title></SPAN></DIV>
<DIV style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 0px; MARGIN-LEFT: 0px; MARGIN-RIGHT: 0px; PADDING-TOP: 0px"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Arial,sans-serif"> <content type="html">&lt;a href="<A href="http://twitter.com/ronm123">http://twitter.com/ronm123</A>"&gt;@ronm123&lt;/a&gt; I meant in a browser, via a second projector probably.</content></SPAN></DIV>
<DIV style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 0px; MARGIN-LEFT: 0px; MARGIN-RIGHT: 0px; PADDING-TOP: 0px"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Arial,sans-serif"> <updated>2009-04-09T12:59:26Z</updated></SPAN></DIV>
<DIV style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 0px; MARGIN-LEFT: 0px; MARGIN-RIGHT: 0px; PADDING-TOP: 0px"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Arial,sans-serif"> <link type="image/png" rel="image" href="<A href="http://s3.amazonaws.com/twitter_production/profile_images/96243182/Photo14_normal.jpg">http://s3.amazonaws.com/twitter_production/profile_images/96243182/Photo14_normal.jpg</A>"/></SPAN></DIV>
<DIV style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 0px; MARGIN-LEFT: 0px; MARGIN-RIGHT: 0px; PADDING-TOP: 0px"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Arial,sans-serif"> <twitter:source>&lt;a href="<A href="http://twitter.com/">http://twitter.com/</A>"&gt;web&lt;/a&gt;</twitter:source></SPAN></DIV>
<DIV style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 0px; MARGIN-LEFT: 0px; MARGIN-RIGHT: 0px; PADDING-TOP: 0px"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Arial,sans-serif"> <author></SPAN></DIV>
<DIV style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 0px; MARGIN-LEFT: 0px; MARGIN-RIGHT: 0px; PADDING-TOP: 0px"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Arial,sans-serif"> <name>jamesclay (James Clay)</name></SPAN></DIV>
<DIV style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 0px; MARGIN-LEFT: 0px; MARGIN-RIGHT: 0px; PADDING-TOP: 0px"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Arial,sans-serif"> <uri><A href="http://twitter.com/jamesclay%3C/uri">http://twitter.com/jamesclay</uri</A>></SPAN></DIV>
<DIV style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 0px; MARGIN-LEFT: 0px; MARGIN-RIGHT: 0px; PADDING-TOP: 0px"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Arial,sans-serif"> </author></SPAN></DIV>
<DIV style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 0px; MARGIN-LEFT: 0px; MARGIN-RIGHT: 0px; PADDING-TOP: 0px"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Arial,sans-serif"> </entry></SPAN></DIV>
<P class=EC_EC_MsoPlainText style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 0px; MARGIN-LEFT: 0px; MARGIN-RIGHT: 0px; PADDING-TOP: 0px"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Arial,sans-serif"></SPAN> </P>
<DIV style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 0px; MARGIN-LEFT: 0px; MARGIN-RIGHT: 0px; PADDING-TOP: 0px"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Arial,sans-serif">I want to be able to strip out the path to the .jpg e.g.<A href="http://s3.amazonaws.com/twitter_production/profile_images/96243182/Photo14_normal.jpg">http://s3.amazonaws.com/twitter_production/profile_images/96243182/Photo14_normal.jpg</A></SPAN></DIV>
<P class=EC_EC_MsoPlainText style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 0px; MARGIN-LEFT: 0px; MARGIN-RIGHT: 0px; PADDING-TOP: 0px"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Arial,sans-serif"></SPAN> </P>
<DIV style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 0px; MARGIN-LEFT: 0px; MARGIN-RIGHT: 0px; PADDING-TOP: 0px"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Arial,sans-serif">But can't work out how to do that. I can access the content of <id>,<title> and even <name> but the tag containing the profile pic link e.g. <link type=”image/png” doesn’t have a closing tag. Presumably I need some kind of function + regular expression - any suggestions?</SPAN></DIV>
<P class=EC_EC_MsoNormal style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 0px; MARGIN-LEFT: 0px; MARGIN-RIGHT: 0px; PADDING-TOP: 0px"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Arial,sans-serif"></SPAN> </P>
<DIV style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 0px; MARGIN-LEFT: 0px; MARGIN-RIGHT: 0px; PADDING-TOP: 0px"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Arial,sans-serif">Cheers</SPAN></DIV>
<DIV style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 0px; MARGIN-LEFT: 0px; MARGIN-RIGHT: 0px; PADDING-TOP: 0px"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Arial,sans-serif">Ron<SPAN style="COLOR: rgb(31,73,125)"></SPAN></SPAN></DIV></DIV></DIV><BR>
<HR>
Rediscover HotmailŪ: Get e-mail storage that grows with you.<SPAN class=EC_Apple-converted-space> </SPAN><A href="http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Storage1_042009">Check it out.</A>_______________________________________________<BR>Xerte mailing list<BR><A href="mailto:Xerte@lists.nottingham.ac.uk">Xerte@lists.nottingham.ac.uk</A><BR><A href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte">http://lists.nottingham.ac.uk/mailman/listinfo/xerte</A><BR></DIV></SPAN></BLOCKQUOTE></DIV><BR><BR>
<HR>
Rediscover HotmailŪ: Now available on your iPhone or BlackBerry <A href="http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Mobile1_042009" target=_new>Check it out.</A> </DIV></BODY></HTML>