in reply to Re: How to ignore/replace all whitespaces,tab spaces, new line from a given string in REGEX ??
in thread How to ignore/replace all whitespaces,tab spaces, new line from a given string in REGEX ??

Thanx a lot !! It worked for me !!

-Sugar
  • Comment on Thanks !! (Re: How to ignore/replace all whitespaces,tab spaces, new line from a given string in REGEX ??)

Replies are listed 'Best First'.
Re: Thanks !! (Re: How to ignore/replace all whitespaces,tab spaces, new line from a given string in REGEX ??)
by ikegami (Patriarch) on Nov 21, 2005 at 15:40 UTC
    Keep in mind that will remove the spaces between words too. If you just want to remove the leading and trailing spaces, use:
    $name =~ s/^\s+//; $name =~ s/\s+$//;