[Ilugc] regular expression the check if a string is absent

  • From: lawgon@xxxxxxxxxxxxxxx (Kenneth Gonsalves)
  • Date: Tue Jun 9 10:22:32 2009

On Monday 08 June 2009 18:10:26 Sivakumar Gopalan wrote:

I am trying to build a regular expression that will find all strings
that do
not start with '2009/'. Any clues?

Which language/script are you looking for, you can actually negate the
result like in perl it is '!~' also grep has a command line option to do
the same.

sorry, should have been more specific. This is an apache rewrite rule. My site 
is 

http://example.com

I want all calls to this site to be rewritten as
http://example.com/2009/. For example:
http://example.com/home/ should become http://example.com/2009/home/. So here ;
the logic is that is the url does not start with '2009/', that should be 
inserted, otherwise it should be left alone.
-- 
regards
kg
http://lawgon.livejournal.com

Other related posts: