▼  Site Navigation Main About Search Articles  ▼  Anime + Manga Anime Reviews Anime Characters Gallery Screenshots Manga Reviews  ▼  Misc News Links to Webcomics Bible Quotes Member Control Panel  ▼  Forum etc. Forums Older Musings Wordpress
site version 7.3
older
newer

8/15/07
Wednesday 1:26am


Date Posted:
8/15/07

added a pretty complicated two lines to the daily quote script to clean up just about any typo in the verse part that I can think of.  It can clean up something like sf%@#$^BB5f,,_–––_,(7),9j and will output 5–7,9 for the verse location.  The previous version could handle most of the above, but not multiple commas.

kk, the script will delete the first character till it gets to a digit.  It will do the same starting at the end of the line.  Another command will get rid of anything that is not a number or comma or dash.  Then if there is more than two characters occuring together that is not a number (which at this point can only possibly be dashes or a commas) it will play it safe and convert it to a single dash.  This means that 4,,5 will be converted to 4–5.  4,5 will remain the same.  4–5 will 4–5 remain the same.  4––5 will become 4–5 and 4,5 will become 4–5.

Problems still remain like the script needs to check that the numbers are always increasingly larger and the number should not be larger than the chapter in the Bible with the largest number of verses (Psalm 119:176).  Still, it is a nice script and demonstrates the use of a more advanced PCRE capability.  In other words my PCRE understanding is growing nicely.  

Soon I will get back to work on CSS so I can clean up a few layout problems on this site that are cropping up in IE7.  I expect there will be a fair amount of work required for this.

archives


TAGS: none

All Memo Tags
anime 1, commercial 1, computer 5, games 21, hard to remember 1, memo blog 1, moving 2, news 11, none 1555, opera 68, quotes 1, reformat hard drive 19, sgopc 1, site update 5, site version 205, star wars 2, swtor 1, video 1, website 8, wishlist 3

copyright 2005–2019