I had been looking on the Internet for a solution to a program I had be working on and sadly didn’t come up with one. I was trying to find a way to use regular expressions to find all the html anchor tags in a string along with matching a wild card URL (ie: secnem.com.*test.html). And after many hours of thrusting my head into my keyboard I came up with:

/<a [^><]*href=[\”\’][^\”\’><]*<rule>[^\”\’><]*[\”\’][^>]*>\s*.*\s*<\/a>/iU

You’d replace <rule> with what ever url rule you want, except for any wild cards in the url I needed to use [^\”\’><]* instead of just .* . This would prevent it from matching outside of the anchor. Bascially [^\”\’><]*  means: match any character except a double quote, single quote, greater than sign, or less than sign. All of which should not be in the href field to begin with.

If you wanted to see what the content of the anchor tag was or the matched href, simply put some brackets around like so:

/<a [^><]*href=[\”\’]([^\”\’><]*<rule>[^\”\’><]*)[\”\’][^>]*>(\s*.*\s*)<\/a>/iU

Hope this helps someone. You can of course adapt this to other html tags by replacing ‘a’ for ‘table’ or w/e. Same with the href. larsolavtorvik.com has a great resource for testing regex in real time and addedbytes.com has a great cheat sheet as well.

Previous ArticleNext Article
T.

Toshiba M200 + Vista Aero = Awesome

So I’ve done the pain staking (very worth it) process of installing Vista on my epic Toshiba M200 Tablet but for the longest time I couldn’t use Aero. Now as my last statement suggests, yes I found a way to run Aero… semi stable (see the list of things that I’ve noticed crash Aero).

To do so I needed:

So first up, I uninstalled my current drivers using the Control Panel, restarted and then ran Nasty File Remover (see below for how I had mine setup)

as you can tell, Aero is running... taken after I did this
as you can tell, Aero is running... taken after I did this

After I did that I downloaded and extracted the nVIDIA ForceWare 98.16 drivers from above to my desktop and copied the modded nvgm.inf to the folder (had to overwrite the existing one). Once it was copied I ran the setup.exe in the folder and restarted my computer. Once my computer was back up and running I started the Desktop Window Manager Session Manager in the Windows Services and applied the Aero effect in the Window Color and Appearance option in Personalize.

I decided to run a Windows Experience Index test to see how my stats improved and I was quite pleased, Gaming Graphics went from 1.0 to 2.3 although Graphics stayed at 1.0.

Windows Experience Index

Things I’ve noticed that crash Aero:

  • Opening some programs in full screen
  • Opening Windows Media Player
  • Opening Paint (yes… mspaint)
  • Going to My Pictures (probably due to thumbnails)

I’ve noticed it flickers sometimes on and off when opening some things, but if it ever crashes I can minimize all my windows then go into the Windows Services and restart the Desktop Window Manager Session Manager. To help improve its stability I went to the Performace under Advanced system settings and toggled Adjust for best performance then checked off Use visual styles on windows and buttons. I had to minimize all my windows and restart the Desktop Window Manager Session Manager to get Aero back but it’s now running fairly well.

Here’s a screenshot of Aero Glass running at 1400 x 1050 @ 32bit color on the Toshiba M200

M200 Aero Demo

As a side note, one may ask why I’m not using the latest 179.xx Forceware drivers and well the answer to that is simple: they don’t work (I tried them). What I may try next are the ~100.xx  Forceware drivers to see if they can add more stability, but for now I’m pleasde with what I have at the moment.