Re: a regex question ..



On Sat, 30 Apr 2005 20:10:59 +0200, Gunnar Hjalmarsson
<noreply@xxxxxxxxx> wrote:

>That's my interpretation as well. How about:
>
> (my $newname = $name) =~ s/(^|\D)(\d)(?=\D|$)/${1}0$2/g;
> rename $name, "new-$newname";

Gunnar,

wonder if you could just talk me through your code?! not sure what
parts of it mean ....

Geoff

.



Relevant Pages

  • Re: a regex question ..
    ... >> Just keep in mind that this will change 'aaa11bbb12' to 'aaa0101bbb0102' ... >That's my interpretation as well. ... Geoff ... Prev by Date: ...
    (comp.lang.perl.misc)
  • Re: AVG free Version
    ... the first time you booted the system you agreed that it was tied to that ... What defines that computer is open to interpretation. ... Kerry ... Prev by Date: ...
    (microsoft.public.windowsxp.general)
  • Re: Time in various languages...
    ... > times that start with 10' is rather the opposite of ... seemed to me the obvious interpretation of 'half 10', ... Brian ... Prev by Date: ...
    (sci.lang)
  • Re: "Shared" procedure division code
    ... 'Meaning' is the result of interpretation, as Wittgenstein had it. ... As it was something done 'to speak or write in reply' it is, ... Prev by Date: ...
    (comp.lang.cobol)
  • Re: Marktordnung versus Nachtruhe
    ... Schleich di, Dammischer ... Gunnar ... Prev by Date: ...
    (de.soc.recht.misc)