From ken at secdat.com Mon Jan 5 14:11:22 2009 From: ken at secdat.com (Kenneth Downs) Date: Mon, 05 Jan 2009 14:11:22 -0500 Subject: [Bostonphptalk] [ANNOUNCE] Second Andromeda Hack-a-thon Message-ID: <49625B5A.50605@secdat.com> We will be having our second hack-a-thon on Jan 17th here on Long Island. The focus will be taking our "free" admin screens that work in Firefox and tweaking them up to work in IE 6 and 7. We will also start work on a windows installer. Location is in East Setauket, Long Island, though we welcome remote participation as well (except you don't get any free food). Anybody interested in participating should contact me off-list for more information. -- Kenneth Downs Secure Data Software, Inc. www.secdat.com www.andromeda-project.org 631-689-7200 Fax: 631-689-0527 cell: 631-379-0010 From greg.rundlett at gmail.com Tue Jan 20 12:54:47 2009 From: greg.rundlett at gmail.com (Greg Rundlett) Date: Tue, 20 Jan 2009 12:54:47 -0500 Subject: [Bostonphptalk] PHP - the whitepaper Message-ID: <5e2aaca40901200954n32f2ae02n5f85fb5e51c0cd03@mail.gmail.com> The Irish PHP User Group has released a whitepaper that explains/promotes PHP http://www.php.ie/index.php?option=com_content&task=section&id=1&Itemid=2 http://www.php.ie/Markup/Html/files/PHPWhitePaper.pdf -- Greg Rundlett Web Developer - Initiative in Innovative Computing http://iic.harvard.edu m. 978-764-4424 o. 978-225-8302 skype/aim/irc/twitter freephile http://profiles.aim.com/freephile -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken at secdat.com Thu Jan 29 22:22:59 2009 From: ken at secdat.com (Kenneth Downs) Date: Thu, 29 Jan 2009 22:22:59 -0500 Subject: [Bostonphptalk] [ANNOUNCE] Andromeda Feature Freeze Message-ID: <49827293.10601@secdat.com> Andromeda is a database application framework written in PHP that builds and uses PostgreSQL databases. I am very happy to announce that as of tonight, we have drafted all features that compose the original vision of Andromeda. We are now entering into debugging and documentation mode and are proceeding to Release 1. the docs are here: www.andromeda-project.org and the demo is at www.andromeda-project.org/demo the source of the demo is available here: https://andro.svn.sourceforge.net/svnroot/andro/apps/finance/application I sometimes like to call Andromeda the "un-framework" because it has little in common with other frameworks out there. Its primary goal is to eliminate as many tasks as possible through radical use of the D-R-Y principle at the database level. In other words, we allow you to specify huge amounts of security and application logic within the description of the database. This has ramifications for the entire cycle. Things like ORM and MVC seem way too complicated after you have built an app with Andromeda -- a seasoned Andromeda programmer wants to spec out the database and get straight to the presentation of custom pages, confidently knowing that the biz logic is all taken care of. If you want to find out more, look at the source directory listed above, you will see that there are only two files. The magic is in the 'finance.dd.yaml' file, the entire demo as you see it is generated out of that file. However, no automated system is ever going to handle every case, so Andromeda lets you freely and easily "escape the cage" at many levels. If you have to 'drink the coolaid' to use Andromeda, we would prefer it be only a teaspoon, not a jug. On a personal note, I'm looking forward to getting to Boston for this month's meeting. Hope to see some of you then. -- Kenneth Downs Secure Data Software, Inc. www.secdat.com www.andromeda-project.org 631-689-7200 Fax: 631-689-0527 cell: 631-379-0010 From ken at secdat.com Sat Jan 31 17:55:28 2009 From: ken at secdat.com (Kenneth Downs) Date: Sat, 31 Jan 2009 17:55:28 -0500 Subject: [Bostonphptalk] Extracting and replacing text in tags Message-ID: <4984D6E0.9020003@secdat.com> I'm going nuts here trying to extract PRE tags, look at their classes, and then call geshi. So you have some html, like
blah blah
mixed in with plenty of other html. I'd like to capture pre tags, its content, and the class name. Any ideas? -- Kenneth Downs Secure Data Software, Inc. www.secdat.com www.andromeda-project.org 631-689-7200 Fax: 631-689-0527 cell: 631-379-0010 From codebowl at gmail.com Sat Jan 31 18:18:33 2009 From: codebowl at gmail.com (Joseph Crawford) Date: Sat, 31 Jan 2009 18:18:33 -0500 Subject: [Bostonphptalk] Extracting and replacing text in tags In-Reply-To: <4984D6E0.9020003@secdat.com> References: <4984D6E0.9020003@secdat.com> Message-ID: <808BD68D-4A19-4094-856F-7F72FA3DF496@gmail.com> why not use a little regex and preg_match? Joseph Crawford http://josephcrawford.com/ On Jan 31, 2009, at 5:55 PM, Kenneth Downs wrote: > I'm going nuts here trying to extract PRE tags, look at their > classes, and then call geshi. > > So you have some html, like
blah blah
> > mixed in with plenty of other html. > > I'd like to capture pre tags, its content, and the class name. > > Any ideas? > > -- > Kenneth Downs > Secure Data Software, Inc. > www.secdat.com www.andromeda-project.org > 631-689-7200 Fax: 631-689-0527 > cell: 631-379-0010 > > _______________________________________________ > Bostonphptalk mailing list > Bostonphptalk at bostonphp.org > http://seven.pairlist.net/mailman/listinfo/bostonphptalk From dshah at hubspot.com Sat Jan 31 19:24:27 2009 From: dshah at hubspot.com (Dharmesh Shah) Date: Sat, 31 Jan 2009 19:24:27 -0500 Subject: [Bostonphptalk] Extracting and replacing text in tags In-Reply-To: <808BD68D-4A19-4094-856F-7F72FA3DF496@gmail.com> References: <4984D6E0.9020003@secdat.com> <808BD68D-4A19-4094-856F-7F72FA3DF496@gmail.com> Message-ID: <577d49280901311624s323289f2q86ddfa58b5ef5e3d@mail.gmail.com> Another option (though nowhere near as fast as going the regex path) is to clean up the HTML and convert it to XML using something like Tidy. Then, you can use relatively simple XPath queries to get the elements you want. I'm not smart enough to write more than the most basic regex queries. But, even I can write xpath queries to get the elements I'm looking for out of a document. Dharmesh Shah Founder and CTO, http://www.HubSpot.com Blogger, http://OnStartups.com On Sat, Jan 31, 2009 at 6:18 PM, Joseph Crawford wrote: > why not use a little regex and preg_match? > > Joseph Crawford > http://josephcrawford.com/ > > > > On Jan 31, 2009, at 5:55 PM, Kenneth Downs wrote: > > I'm going nuts here trying to extract PRE tags, look at their classes, and >> then call geshi. >> >> So you have some html, like
blah blah
>> >> mixed in with plenty of other html. >> >> I'd like to capture pre tags, its content, and the class name. >> >> Any ideas? >> >> -- >> Kenneth Downs >> Secure Data Software, Inc. >> www.secdat.com www.andromeda-project.org >> 631-689-7200 Fax: 631-689-0527 >> cell: 631-379-0010 >> >> _______________________________________________ >> Bostonphptalk mailing list >> Bostonphptalk at bostonphp.org >> http://seven.pairlist.net/mailman/listinfo/bostonphptalk >> > > _______________________________________________ > Bostonphptalk mailing list > Bostonphptalk at bostonphp.org > http://seven.pairlist.net/mailman/listinfo/bostonphptalk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken at secdat.com Sat Jan 31 19:42:26 2009 From: ken at secdat.com (Kenneth Downs) Date: Sat, 31 Jan 2009 19:42:26 -0500 Subject: [Bostonphptalk] Extracting and replacing text in tags In-Reply-To: <808BD68D-4A19-4094-856F-7F72FA3DF496@gmail.com> References: <4984D6E0.9020003@secdat.com> <808BD68D-4A19-4094-856F-7F72FA3DF496@gmail.com> Message-ID: <4984EFF2.4080307@secdat.com> I was trying to use a preg_split, and just realized I'd be better off with the preg_match. I can look at the matches and do string substitutions after that. Joseph Crawford wrote: > why not use a little regex and preg_match? > > Joseph Crawford > http://josephcrawford.com/ > > > On Jan 31, 2009, at 5:55 PM, Kenneth Downs wrote: > >> I'm going nuts here trying to extract PRE tags, look at their >> classes, and then call geshi. >> >> So you have some html, like
blah blah
>> >> mixed in with plenty of other html. >> >> I'd like to capture pre tags, its content, and the class name. >> >> Any ideas? >> >> -- >> Kenneth Downs >> Secure Data Software, Inc. >> www.secdat.com www.andromeda-project.org >> 631-689-7200 Fax: 631-689-0527 >> cell: 631-379-0010 >> >> _______________________________________________ >> Bostonphptalk mailing list >> Bostonphptalk at bostonphp.org >> http://seven.pairlist.net/mailman/listinfo/bostonphptalk > > _______________________________________________ > Bostonphptalk mailing list > Bostonphptalk at bostonphp.org > http://seven.pairlist.net/mailman/listinfo/bostonphptalk -- Kenneth Downs Secure Data Software, Inc. www.secdat.com www.andromeda-project.org 631-689-7200 Fax: 631-689-0527 cell: 631-379-0010 From bob at rsi.com Sat Jan 31 21:55:32 2009 From: bob at rsi.com (Bob Gorman) Date: Sat, 31 Jan 2009 21:55:32 -0500 Subject: [Bostonphptalk] Extracting and replacing text in tags In-Reply-To: <4984D6E0.9020003@secdat.com> References: <4984D6E0.9020003@secdat.com> Message-ID: <49850F24.6030807@rsi.com> On 01/31/2009 05:55 PM, Kenneth Downs wrote: > I'm going nuts here trying to extract PRE tags, look at their classes, > and then call geshi. > > So you have some html, like
blah blah
> > mixed in with plenty of other html. > > I'd like to capture pre tags, its content, and the class name. > > Any ideas? My first attempt would be to try an un-greedy regular expression, like this: blah blah"; $exp = '|]+)>(.*)|U'; $arr = array(); preg_match_all($exp, $sub, $arr); print_r($arr); ?>