English
Forum

Translate and RegEx

 

Jörg
Sellmeyer
Hi,
how'bout if Translate a optionalen Parameter get:
CompileMarkSeparation
Translate$(Text$,Zeichen$,Ersatz$,RegEx%)
>

If RegEx% 1 is, functions Translate$ so, like a before eingestelltes Set(RegEx,1).
If RegEx% 0 is, functions Translate$ so, like a before eingestelltes Set(RegEx,0).
without additional Parameter holds Translate itself on whom with Set(RegEx,n%) tuned worth.

I hit the to, because in the program often between both hither and thither geschaltet go must and these Version The work still very relieve would.

so can itself first time behelfen:
CompileMarkSeparation
Proc TransReg$

    If %pcount = 3

        Parameters s$,s1$,s2$
        Return Translate$(s$,s1$,s2$)

    ElseIf %pcount = 4

        Parameters s$,s1$,s2$,rx%
        Declare ret$
        rx%=Set("RegEx",rx%)
        ret$=Translate$(s$,s1$,s2$)
        Set("RegEx",rx%)
        Return ret$

    EndIf

ENDPROC


solid installed would the certainly faster.

Greeting
Jörg
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
10/14/06  
 




Nico
Madysa
Nunja, but if You hold not to regulären Asudrücken seek, can you whom sought Text still integrally normal prompt, or?
CompileMarkSeparation
text$ = Translate$(text$,"Mein schönen tolles Käsebrot","Deine suppie Wurststulle)
>

would with Set(RegEx,1) and Set(RegEx,0) the same Result supplying, or?
 
Nico Madysa
10/16/06  
 




Jörg
Sellmeyer
[quote:7cca656b81=Nico Madysa]Nunja, but if You hold not to regulären Asudrücken seek, can you whom sought Text still integrally normal prompt, or?
CompileMarkSeparation
text$ = Translate$(text$,"Mein schönen tolles Käsebrot","Deine suppie Wurststulle)
>

would with Set(RegEx,1) and Set(RegEx,0) the same Result supplying, or?[/quote:7cca656b81]
only: If you before RegEx eingeschaltet have functions some things not any more. You must z.B. no $ or ~ in the Suchstring having.
one must means always first testing whether RegEx one or from is. or jedesmal hereon respect RegEx again auszuschalten. what again two Lines code More means, The with a 4 Parameter in Delphi-speed worn out would.

Greeting
Jörg
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
10/16/06  
 




Nico
Madysa
and How wärs so?
CompileMarkSeparation
proc NewTranslate$

    parameters wort$ , such$ , ersatz$ , mod%
    declare status% , res$
    status% = Set("RegEx",mod%)
    res$ = Translate$(wort$,such$,ersatz$)
    Set("RegEx",status%)
    return res$

e
 
Nico Madysa
10/16/06  
 




Jörg
Sellmeyer
this is Yes very the, I supra too written have, only that by me one Translate with 3 Parameters even too as normales Translate treats becomes.
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
10/16/06  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

1.896 Views

Untitledvor 0 min.
H.Brill12/07/23
Walter06/05/22
Sven Bader08/10/21
Christof Neuß09/06/18
More...

Themeninformationen

this Topic has 2 subscriber:

Jörg Sellmeyer (3x)
Nico Madysa (2x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie