Entry
TSE: File: Search/Replace: Character: Decimal: How to replace a decimal character?
Dec 12th, 2003 11:20
Knud van Eeden,
----------------------------------------------------------------------
--- Knud van Eeden --- 11 December 2003 - 07:59 pm -------------------
TSE: File: Search/Replace: Character: Decimal: How to replace a
decimal character?
---
Use the notation
\d<the decimal character value you want to replace>
---
---
Method: Manually replacing
---
For example:
I want to manually replace the ù character (decimal 151) by u instead.
---
Steps: Overview:
1. -Open TSE
2. -Load the one or more files in which you want to replace
3. -select from menu option <ESCAPE>
4. -Press the 'S' to 'S'earch
5. -Press the 'R' to 'R'eplace
6. -In the text box type the following:
\d151
7. -Press <ENTER>
8. -Press the new string you want to replace with
e.g. type
u
9. -Press <ENTER>
10. -Supply the replace options
e.g. type
ngax
where
'n' means 'n'o asking for replace
and 'g' means 'g'lobal, thus in the whole file
and 'a' means 'a'll files that are currently loaded
and 'x' means a regular e'x'pression
---
---
Method: Using a macro and LReplace() or Replace()
---
The general format of LReplace() and Replace() is:
LReplace( <your originalstring>, <your replace string>, <your replace
options> )
---
For example:
I want to programmatically replace the ù character (decimal 151) by u
instead.
---
Run for example the following macro:
PROC Main()
LReplace( "\d151", "u", "ngax" )
END
That will replace the decimal character 151 by the character u,
without asking, in all the loaded files (using a regular expression).
---
---
Internet: see also:
---
TSE: File: Search/Replace: Character: Hexadecimal: How to replace a
hexadecimal character?
http://www.faqts.com/knowledge_base/view.phtml/aid/27322/fid/865
----------------------------------------------------------------------