Tuesday, June 17, 2008

Regular expression

A regular expression is a pattern describing a certain amount of text or a regular expression is a set of characters that specify a pattern. Regular expressions are used, when you want to search for specify lines of text containing a particular pattern. A regular expression matches specific word or string of characters. You can search for words of a certain size. You can search for a word with four or more vowels that end with an "s."

There are three important parts to a regular expression. Anchors are used to specify the position of the pattern in relation to a line of text (like ^ indicates the character(after ^) should be at the beginning of string and $ indicates character(before $) should be at the end of string ). Character Sets match one or more characters in a single position like [a-z] means any single alphabet(lower case) and [0-9] any digit between 0 to 9 .

Modifiers specify how many times the previous character set is repeated like * represents zero or more times and ? means one or more times.

For example:^AD*B$ matches a string that starts with ‘A’ and ends with ‘B’ and should contain zero or more ‘D’s like AB, ADB, ADDB, ADDDB…..

Regular expressions are case sensitive.

There are some operators like:
\w - Matches a word character
\W - Matches a non word character
\s - Matches a space, a new line character or a tab
\d - Matches a digit character

References:
http://www.regular-expressions.info/tutorial.html http://www.grymoire.com/Unix/Regular.html http://www.2150.com/regexfilter/Documentation/regular_expressions.asp

Wednesday, June 11, 2008

Motherboard Cleaning Tips

Motherboard is the main part of your computer that contains all hardware components. Your computer motherboard could fry, if you do not keep it clean on periodically basis. Dust is the main cause to heat up your system and heat link to hardware failure. You can save your computer maintenance cost if you clean your computer on the regular basis. This will improve the cooling and performance of the motherboard components.

  • To clean your motherboard first unplugs your system power from the electrical outlet.
  • Using the screwdriver remove the side covers of your computer case and put them to one side.
  • Check all data and power cables connections. Inspect all motherboard PCI and AGP slots.
  • Remove all add-on card of your motherboard for example RAM, modem, VGA, sound card and LAN card.
  • Now blow the air around all the motherboard sides and keeping away your blower nozzle 4 to 5 inches away from main board components. You can use vacuum cleaner also for this purpose but compressed air is the better solution to clean a system.
  • At the end assemble back all cards, cables and side covers of your system.
  • I recommend you doing this after every three months if you want to save your system life.

Source: Gathered from Internet, while browsing through a Site.

Computers Add to Technorati Favorites Programming Blogs - BlogCatalog Blog Directory