Hi,

I know phReplace but it doesn't save multiple profiles, it just restores the
last searh. Yet I'd like to make some different scripts where I can easily add
multiple regexp.

I did try to create one (see below) but I'm a noob and it doesn't work (cause
conspicuous dirty code). So based on this template, please could you help me to
get THE script?  ;-)


'------------------------------------------------------------------------------
' file PDF to TXT.vbs
' date 2009.02.05
' author fred
------------------------------------------------------------------------------

Const module_name = "PDF to TXT"
const module_desc = "Cleanup TXT file create by FoxitReader when it saves PDF
files to TXT files"
Const module_ver = "1"

Sub Init
        menuName = "&" & module_name
        addMenuItem "Cleanup TXT from FoxitReader" , menuName, 
"Rename_GetNewName"
        addMenuItem "&Editer le script" , menuName, "openFile"
End Sub

Sub openFile
        Set obj1 = newEditor()
        obj1.openFile(moduleFileName(module_name))
End Sub


' ********************************************************
'                  Declare Function
' ********************************************************
Function Rename_GetNewName (ByRef strNewName)

         Set editor = newEditor()
                editor.assignActiveEditor
                strname = editor.Text
                editor.command "ecSelectAll"

        Dim re
        Dim strWordArray
        
' Create a RegExp object
        Set re = new RegExp
        re.IgnoreCase = True ' Case-insensitive matching.
        re.Global = True ' All matches will be replaced, not just the first 
match.


' ********************************************************
'                    EXPRESSIONS
' ********************************************************

        re.Pattern = "-+ page [0-9]+-+"
        strname = re.Replace(strname, "")
        
        re.Pattern = "example"
        strname = re.Replace(strname, "")       

        re.Pattern = "etc."
        strname = re.Replace(strname, "")


        strNewName = strname


End function

-- 
<http://forum.pspad.com/read.php?2,48923,48923>
PSPad freeware editor http://www.pspad.com

Odpovedet emailem