Posts Tagged ‘search’

Wolfram Alpha – computational knowledge engine: The new search?

May 17th, 2009

Wofram Alpha looks really interesting. Found it on techcrunch. Do find it really useful if the data are accurate. Read the techcrunch above for a more indepth view of Wofram. I tried doing a search on Singapore and got some pretty interesting results. But my name did not get any result. =(

Some stuff that can be used to find on Wolfram Aplha:

    • Date (e.g. a birth date) – can get a historical date and events
    • Town (e.g. a home town) – e.g. singapore as shown above
    • Stocks (e.g. IBM, apple)
    • Calculation and Maths formula

pretty cool right?

VN:F [1.9.6_1107]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.6_1107]
Rating: 0 (from 0 votes)
DiggTwitterTechnorati FavoritesRedditNewsVineFacebookShare

Searching within String in Perl

November 10th, 2008

was working on improving a current script in perl and was trying to search through a particular string to get some variables.

For example, an instance in the loop, a string has already been set as $_ = <hkugmdi name=”myname” folder=”myfolder” title=”mytitle> and i want to obtain the name “myname” in every instance of the loop. the below is an if statement which can get the desired input.

if (( $_ =~ m/name\=\”(\w+)/) || ( $_ =~ m/name\=(\w+)/) )

$_ => current string

m => match

name\=\” || name= => match name=” or name= in the string

(\w+) => first word

some other useful syntax

$& => current value

$` => before the string is matched

$’ => after the string is matched

$1 => first grouping

so for the above example,

when i do a print “before value $`, current value $& and after value $’ to get the string desired $1″

i get

before value <hkugmd, current value name=” and after value ” folder=”myfolder” title=”mytitle> to get the string desired myname

VN:F [1.9.6_1107]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.6_1107]
Rating: 0 (from 0 votes)
DiggTwitterTechnorati FavoritesRedditNewsVineFacebookShare
Get Adobe Flash playerPlugin by wpburn.com wordpress themes