d-napizzle has asked for the wisdom of the Perl Monks concerning the following question:
I want to replace that mystery character between the 6 and the 1 with a -. That's it. But figuring out what that character is is driving me crazy.$str="6 1/2"; # actually it comes from a file of tokenized strings $str=~s/_/-/;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Weird underscore/whitespace failing regex
by JavaFan (Canon) on May 12, 2009 at 23:03 UTC | |
by Fletch (Bishop) on May 13, 2009 at 16:57 UTC | |
|
Re: Weird underscore/whitespace failing regex
by almut (Canon) on May 12, 2009 at 22:50 UTC | |
|
Re: Weird underscore/whitespace failing regex
by moritz (Cardinal) on May 12, 2009 at 22:39 UTC | |
|
Re: Weird underscore/whitespace failing regex (nbsp)
by tye (Sage) on May 12, 2009 at 23:56 UTC | |
|
Re: Weird underscore/whitespace failing regex
by przemo (Scribe) on May 12, 2009 at 22:20 UTC | |
by ikegami (Patriarch) on May 12, 2009 at 22:40 UTC | |
|
Re: Weird underscore/whitespace failing regex
by d-napizzle (Initiate) on May 13, 2009 at 13:54 UTC |