perl escape chars!

Antonis Faragitakis afarazit at yahoo.com
Fri Aug 19 14:47:38 EEST 2005


Apollon Koutlides wrote:

> Antonis Faragitakis wrote:
>
>> mipos gnorizi kapoios pos agnorizi i perl se ena windows text 
>> document to paragraph mark
>> etsi oste na to kano replace me tipota!?
>
>
> Δεν είμαι σίγουρος τι εννοείς "paragraph mark", ωστόσο αν ξέρεις το 
> charcode του μπορείς να χρησιμοποιήσεις octal ή hex notation σε ένα 
> regex, π.χ.:
>
> $string =~ s/\033//;       # Octal 033
> $string =~ s/\x1B//;       # Hex 1B
> $string =~ s/\x{263a}//;   # Wide Hex (painful multibyte-char issues 
> notwithstanding)
>
>
iparxei autos o kodikas (word macro)

With Selection.Find
        .Text = "<NTMMemoryDb>^p<Description>^pArchive^p</Description>^p"
        .Replacement.Text = ""
   End With

o opios opou brei:

<NTMMemoryDb>
<Description>
Archive
</Description>

to kanei replace me tipota, to sbini diladi.

se perl egrapsa to 
s/<NTMMemoryDb>\n<Description>\nArchive\n</Description>\n//; alla 
tipota, to idio isxi kai gia to \r\n kai \r
distixos den ksero to charcode

kamia idea!?

Filika
Antonis






More information about the Linux-greek-users mailing list