Lookahead and Lookbehind in regex tutorial


Lookaheads are one of the most powerful feature in regular expressions.  Lookaheads helps you to broaden your matches. You really may need to depend on these lookaheads in many scenarios. For instance, if you want to match every  “N” in the paragraph which is not followed by  a “O” . You cannot use the not (^) , say  /N[^O]/  as it will match the second character also.  So here comes the use of lookaheads and lookbehinds.


    • Postive Lookahead– This will match groups which are followed by the group specified via the lookaheads. Have a look at this example, we need to match every N that is followed by an O .

This would the positive lookahead regex

Regex :


The given example will match every  N that is followed by and O . Here the (?=O) is the positive lookahead group.

Live Demo to Positive Look aheads

  • Negative Lookahead – This will match groups which are not followed by the group specified via the lookaheads

Regex : 


This matches exactly the opposite what the positve lookahead matched. This matches every N that is not followed by an O , the negative look ahead group is  (?!O), and the !O represent that its a negative look ahead.

Live Demo to Negative Look aheads

2. Lookbehinds

The concept of lookbehinds are simple, its just the opposite of the look aheads. It matches the very next group obeying the condition of the Look behind group

  • Postive Lookbehind – This will match the groups which which are followed by the group specified via the lookbehind.

example : Consider the case were we need to match every O that comes right after an N.

Regex : 


The (?<=N) is the positive look behind group and it indicates that every O should me matched if its followed by and N . Live demo link to postive look behind 

  • Negative Lookbehind - This will match the groups which which are not followed by the group specified via the lookbehind.

Regex : 


The negative look group indicates that every O should me matched if its not followed by and N .

Live demo link to negative look behind

This theory is very much helpful in matching the contents inside brackets () or html tags (<>) .

Practical Examples Of Regular Expressions- Match contents inside  a bracket.


Here the Positive look behind group  (?<=\() and positive look ahead  group (?=\)) makes the total expression to match the whole content inside the bracket. "\"  is use escape the Brackets.

Live Demo to regex to match contents inside brackets

Also read, Useful Regular Expressions in real life

Why the IT business start up graph is increasing? – 7 Reasons

it startup

image credit :http://www.famousbloggers.net

Tom is a programmer and Jerry is a designer. Just have a look at this small conversation between Tom and Jerry.

Tom: Hey Jerry, you are a good designer. I know how to program. Why don’t we start an IT business?
Jerry: I too was thinking about starting an IT business. Lets think about this.
Tom: What we need initially is a Company name(domain name), design and functionalities for  the company website.
Jerry: But we need an office right?
Tom: We dont need it now, we just need an address. We can put our home address as the office address in website.
Jerry: Ok, Thats a good Idea.
Jerry: How will we get work?
Tom : We can get it from elance and freelancer. Also we can do some seo to our website and get some from Google. We need to create a facebook page and can do facebook promotions.
Jerry: Great! Lets do it. Can’t wait for it.

So, thats all and a new IT company is formed. What all factors played key roles in the formation of the company?

1. Low Investment

As said in the above conversation. IT business is the business which require zero initial capital(investment) . What you require is your pc and the internet.

” If it doesn’t cost me money, I would like to try it ” .

This common attitude reflects very much in the IT business. This is one of the major reasons why lots of people try their luck in IT industry. The salary gained by an average employee is limited and he/she gets into business to fulfill their dreams and desires. Unlike any other business, an IT business can be started with less resource and moderate business skills(say communication skill and all).

To make this point clear lets  assume  the case of a Food Business.  You’ve launched a new food product into the market, say something like lays (as a snacks). What all things you need to take care of while doing such a business?

  1. Production environment – You may require advanced machineries, food materials, man power,quality control(highly essential for a food product, if something goes wrong, you are in prison) .  
  2. Vigorous Marketing – No one buys your product if its not marketed. No one tries a cola if its unknown(people only try branded colas like coke or pepsi). So you need market vigorously. You need to build your own brand in the industry.
  3. Time Limit – You need to sell  all your food products before it get expired, or else you will be suffering huge loss.
  4. Transportation – You need to transport the product from dealers or to sellers and buyers. It depends on how you run your business. But in all manners transportation expenses (starting from the raw materials to final product  and to buyers home ) will play a big role. Now, whats the deal with transportation in an IT business? You are transporting product (service) over the internet (which ideally means zero transportation charge).

2. Venture Capitalists and Other Supports

The support given by the venture capitalists  and other authorities are also one of the major reasons for these startups. Some of the leading venture capitalists are,

These capitalists provide funds for IT business especially if you have a really good idea and an awesome team. Also the government in many countries are promoting IT startup,s offering free office space and connectivity. In India(who leads the IT  outsourcing all over the world), the government has opened various IT parks for the IT start ups alone.

3. Availability of Resource

This is another main reason for a “yes” to an IT business. Lots of programmers, SEO , designers, SMO, writers or whatever related to the IT sector are available in large scale. If not in your country, you can hire them from countries like India, Indonesia, Philippines, Singapore, China etc.

2.97 Million IT professionals are there alone in India (Thats very much closer to the total population in countries like NewZealand). Well as English is getting global, you don’t need to worry about the English in these countries too. Both the written and spoken English level of the the employees(IT sector ) in countries like India and Philippines are pretty good. Many of the IT companies in these countries offer good quality and service too.

4. Global Visibility

Owing the fast transportation, internet and other technical advancements, two countries are no longer distant. Considering the above example, you need to export your food product and face all the risks and difficulties if you need to  expand your business  to other countries. Whats the deal with IT ?

  • Do you have to export something in containers ? –  NO.  
  • Do you need to worry whether your ship sink?  – NO.
  • Do you need to fly abroad ? – Probably No , as your product or service is digital .You can describe everything about your product  through internet.

Anyone in this world can check your portfolio or products through your website. Anyone can buy your  products or services online.   Anyone can communicate with you easily. And if you are launching a product(tool) (say, A Website builder tool ) you  can market it all over the world through multiple channels (Adwords, Facebook etc ).

5. Fame and Glamour

People live in the IT industry today. Everyone have got facebook and gmail accounts. So naturally, Mark Zuckerberg, Steve Jobs and Bill Gates are celebrities. The movie Social Network was widely accepted by wide range of audiences(especially the youngsters ). Being a programmer or in the IT industry was considered as a geeky stuff before. But things have changed drastically. A successful IT professional got great value and status  in the society today. If your online product (website) gets successful and viral ,you will be famous in no time.

6. Money

Well, here comes the most important part of every business. How much money can you make in this field? The answer would be  “pretty good” (if operated wisely). The most successful IT service companies(in terms of profit) does business in highly developed countries like USA, Australia or England  and outsource the service to countries like India or China (Where you can get the services done in 1/10 th of the service  cost in these countries ). As I said before as two countries are not distant anymore, one can get clients from these developed countries. Lots of online money making  sources are there  like ,

  • Google Adsense
  • Affiliate Programs
  • Business in Online Market Places
  • Content writing

These sources gives great confidence to the new start ups as there are lots of  success stories of people around the world  making millions of income  through these sources.

7. Google

Google should be added up as the synonym for knowledge. Google gives answer to  almost all questions in this world.  Google gives you the confidence to  learn different leading technologies in the IT industry. Google and stackoverflow solves almost the  major part of issues were a developer is prone to get into . Making it simple, if some one is  asking a non technical person who intend to start an IT company (say in PHP )  like “What do you know about php ?” Its very much possible that he reply  “I don’t know anything, but Google can teach me!” .  This is also a major reason for the increasing ratio of  IT start ups.


Marketplaces for Content Writers to Make Money

If you are a “Content Writer” who looks to earn more money by getting more work, then “marketplaces” are a great place to look for new projects. A marketplace is usually a website where people who are in need for content, publishes their project requirements in open. You can register with the marketplace website (usually as a service provider) and apply for the work with your references. If the client likes your work and portfolio, he may award you the project!

marketplaces for content writers to make money online
© Copyright Tony Grant and licensed for reuse under this Creative Commons Licence

Note:- This article is in fact a continuation of :- How Content Writers can make money by taking Online Writing Jobs

Freelancing Websites – are a great place to get new content writing projects. The basic working of every freelancing websites are same. There are two types accounts (people) in freelancing websites, Service providers & Service buyers. A content writer like you have to register account in  freelancing websites as a “service provider”. As a service provider you can upload your work portfolio, write details about your skills, your hourly rates, your experience and all such details in your profile page.  You can follow this link to see the profile of an experienced content writer in Elance:- Profile of Susan Bennet.

Note:- Like every other field, a new entrant will struggle in freelancing marketplaces too. Nobody would prefer to give projects to inexperienced service providers. However with persistence & hard work you can work your way up in a freelancing marketplace. I have written a detailed guide on this:- How to build a premium profile & win maximum projects in Freelancing marketplaces

1. Elance – is the top rated freelancing website of all. Most of the service buyers in Elance are from United States & Europe. As a service provider, you can expect better payment terms & rates from service buyers in Elance. Moreover Elance is the market leader among freelancing websites. Since the payment rates are better in Elance, quality expectation is naturally higher. Everyone (me & you) needs  a little inspiration to move his/her butt & do something useful. As an aspiring content writer, you can seek inspiration from the top rated content writers in Elance who make thousands of US Dollars every year. Words You Want is a premium profile in Elance who made more than a million US Dollar from Elance alone. They are a group of professional writers (based in USA) who takes premium jobs in Elance. This year they have completed (as on July 27th – 2013) nearly 1200 projects and made over USD 38,0000. Express Writers is another content writer in Elance who does fairly well. They have started their elance account just one year back (in 2012) and this year they have done around 391 projects & made around 70,000 US Dollars. Soubhik Chakrabarthy is a freelancing content writer from India who has made around 16,000 US Dollars this year from Elance alone. I just pointed out 3 profiles in Elance! You can find hundreds of freelancers who make thousands of US Dollars every year from Elance as content writers.

Note:- You should bid for projects based on your skills & expertise only. Some projects may explicitly require a native of some specific countries. For example, some service buyers in USA specify that they need a writer from USA who knows local audience. A provider from India may not bid for such projects.

2. ODesk – is the 2nd leading freelancing marketplace. The service buyers in Odesk are from USA & Europe as well. The way ODesk works is lightly different from Elance. ODesk gives more protection to buyers by employing their own unique methods. They have built in hour tracker, which will track your desktop if you take projects for hourly rates. You can browse through profiles of top content writers in Odesk in gain inspiration and work your way up.

3. Guru – Guru is the 3rd leading freelancing marketplace for service providers. Unlike Elance & Odesk, service buyers in Guru are distributed across the world. There are buyers from USA, Asian Countries, African Countries & other continents as well. The service buyers in Guru are usually individuals or self employed business owners like a confectionery owner, or a restaurant owner etc. Payment rates are usually lower than Elance & ODesk. New writers can consider Guru as it will help them gain enough experience and some earnings as well. To get some inspiration here is a list of top service providers in Guru. Browse through them to get more ideas.

4. Freelancer – is another marketplace which every service provider can consider. I don’t know much about this marketplace to explain more. However it has been in existence for several years and one can consider investing time to build profile here.

New Generation Marketplaces

The above 4 marketplaces works in almost similar manner where service buyers will post their requirements as projects. Service providers will have to bid on each project to get work. Here service providers have to work extra hours to bid on new projects. This will affect their focus to produce quality output on taken projects. Some new marketplaces have successfully tweaked this process a little bit. In these market places, importance is given to profile of a service provider. The provider can build a very detailed profile by listing all the services he/she provides. Service buyers have to browse through each profile (and the services each provider offers) & select the one he/she likes. In this approach, service providers save considerable amount of time used for bidding projects. Providers can focus more time on satisfying the customer. I have listed 2 such freelancing marketplaces below.

1. PeoplePerHour – is a new generation marketplace for freelancers. See the profile of Kristian S (a copywriter from United Kingdom) who sells  3 different services under one profile. His best selling service is a 150 words SEO article. Similarly Megan C is another writer from United Kingdom who sells different kind of services. This way you can start a profile here as well & make enough earnings by selling services you are really good at. One advantage of this marketplace is that you can sell services you are really good at.

2. MicroLancer – is a new marketplace launched in 2013 by Envato (an Australian marketplaces company). Though the marketplace is in its infancy, you can definitely build a profile here, as it is supposed to be a successful one. Envato – the parent company which owns MicroLancer is an expert in building marketplaces & communities.

I am sure these market places can generate some good income for you. Did I miss something? Let everyone know, post your comments 🙂 .

Why you should start your online business in WordPress?


1. Very easy Admin side

Its very easy to manage your stuffs in the wordpress admin. Basically all the stuffs inside wordpress are based on the basic posts concept. This makes it easy for the administrator to manage all the admin side of the site. You just need to understand the purpose of custom posts and custom taxonomies.

  • Custom Posts – Assume that you got two products, 1. Food and 2. Shirts . You can create  two custom post types for Food and Shirts so that both of them appears as different sections(posts) in the admin side and you can manage them separately.
  • Custom Taxonomies(Categories) – The above mentioned products should have different categories also (say, Veg, Non Veg etc for Food and casuals,Tee etc for Shirts). Here is where custom taxonomies help you.

2. All the essential features for a moderate business.

So what all are the essential features(pages) required for the website of an average business?

  • Products Page
  • Product Categories page
  • Contact Page.
  • Cart and Checkout (if its shopping cart)
  • User Login system.
  • Photos, Videos and Gallery.

WordPress meets all these requirements. Shopping cart is also possible through wordpress plugins like WP Ecommerce and Woo Commerce .

3. Easy Customization

Lots of online documentations are available for wordrpess. Now a days, the designers them self are doing wordpress stuffs. What does that mean?
You don’t need to be well versed in php. Just the basic knowledge will be enough for you to do the  customizations (within a limit). And some customizations are possible even without the basic knowledge.

4. Availability of lots of plugins.

WordPress would the framework with the most amount of plugins .No wonder ,as 1 out of six websites in the internet is in wordpress! So that is something which is supposed to happen.
There are lots of free plugins through which you can customize your wordpress. Plugins range from smaller (Social sharing like Shareaholic) to bigger ones like (Shopping cart like WP Ecommerce and Social networking like BuddyPress ) . Some of the plugins are even heavier than the size of wordpress. Have  a look at the WordPress Plugins available

5. Theme Availability.

Lots of themes are available for wordpress. Especially in themeforest, there are themes in different niches like
real estate, food and beverage,Portfolio etc. And interestingly you can buy most of them between a price of 40-60$. Other major wordpress theme market places are Mojo Themes and Woo Themes

What all features will you get with these themes while you spend 40-60$?

Where will you get a website for such a cheap price? If you have a host, and if you know how to host a website,
the 50 $ would be the only cost which you may need to put on starting the website. Lets think about the scenario with a real estate website.
Assume that you are intending to start a real estate website. Just imagine the cost if you hire a web development company for this purpose?
I am sure it would cost a minimum of 1000$ . While if you use a wordpress theme, you can limit the cost below 100$(maximum cost). Which certainly is not a bad deal, as you’ve saved almost 90% of the money which you had to put into.
You will be getting all these required features from a reputed theme.

  • Complete Design.
  • Administrator Management.
  • Full Functionalities.

6. Easy Upgrade.

You can easily updgrade wordpress without much difficulties. Also if you are buying theme from a reputed company, they(most probably) will update their themes to newer versions so that it would be compatible with the newer wordpress versions.

7. Search Engine Friendly.

From my personal experience, all my wordpress websites have performed well in google than the other ones. WordPress is very light weighted and well coded. We can have meta tags and seo friendly urls in wordpress. More over we can optimize the meta tags, title and other things needed for seo for each and every posts if we use plugins like YOAST SEO. This will give you better rankings in google in no time which is very important for your business.