▼  Site Navigation Main Articles Search  ▼  Anime + Manga Anime Reviews Anime Characters Gallery Screenshots Manga Reviews  ▼  Misc News Links to Webcomics Bible Quotes About Older Musings
site version 7.3

Wednesday 1:26am

Date Posted:

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.


TAGS: none

All Memo Tags
anime 1, article 1, commercial 1, computer 5, games 22, hard to remember 1, keyboard shortcuts 1, links 1, memo blog 1, mini-review 5, moving 2, mysql 1, news 11, none 1635, opera 68, private 4, quotes 1, reformat hard drive 19, sgopc 1, site update 11, site version 205, star wars 2, swtor 1, video 1, website 9, wishlist 3

copyright 2005–2020