Not able to remove leading spaces

Hi Experts,

In a file tht i copied from the web , i am not able to remove the leading white spaces. I tried the below , none of them working . I opened the file through vi to check for the special characters if any , but no such characters found.
Your advice will be greatly appreciated.

sed 's/^\s*//g' file_name.txt

sed 's/^[ \t]*//g' file_name.txt

sed 's/^[ \t]*//'  file_name.txt

sed 's/ //g' file_name.txt

if you have Python

#!/usr/bin/env python
for line in open("file"):
  line=line.strip()
  print line

With sed:

sed 's/^ *\([^ ]*\)*/\1/' file

Thnks ghostdog74 & Franklin.

ghostdog74 : Your solution worked fine

Frankline : Still i am getting same output , lines with leading white spaces

I did n't understand why the sed is not working for the file.

Let me do some more investigation and will reply if somethng goes fine.

Probably you have leading spaces and tabs, try this one:

sed 's/^[     ]*\([^     ]*\)*/\1/' file

Within the character classes you have to type a space and a tab. Type <Ctrl-v> <tab> for the tab character.

Regards

Yes Franklin ..It's worked fine this time.

Thnk you.

Regards

Sastry