WCM - Das österreichische Computer Magazin Forenübersicht
 

Zurück   WCM Forum > Rat & Tat > Software

Software Rat & Tat bei Softwareproblemen

Microsoft KARRIERECAMPUS

Antwort
 
Themen-Optionen Ansicht
Alt 18.07.2004, 11:49   #1
flinx
Inventar
 
Registriert seit: 08.04.2001
Beiträge: 3.101


Standard

Quick & Dirty & ohne Gewehr:
Musst du noch für die anderen Figuren erweitern und den Fall eines Leerraumes einbauen.

Code:
Sub Suchen()
    ActiveDocument.Select
    Selection.Find.ClearFormatting
    With Selection.Find
        .Text = "[1-9].R???[K,Q,R,N,B,S,L,T,D]"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchAllWordForms = False
        .MatchSoundsLike = False
        .MatchWildcards = True
    End With
    While Selection.Find.Execute    
    Selection.Text = Replace(Selection.Text, "R", "T", 1, 1)
    Wend
    ActiveDocument.Select
    Selection.Find.ClearFormatting
    With Selection.Find
        .Text = "[1-9].[K,Q,R,N,B,S,L,T,D]???R"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchAllWordForms = False
        .MatchSoundsLike = False
        .MatchWildcards = True
    End With
    While Selection.Find.Execute
    Selection.Text = StrReverse(Replace(StrReverse(Selection.Text), "R", "T", 1, 1))
    Wend
End Sub
Edit:
[1-9].R?[1-9]?[K,Q,R,N,B,S,L,T,D] bzw.
[1-9].[K,Q,R,N,B,S,L,T,D]?[1-9]?R
wäre ev. etwas genauer.
flinx ist offline   Mit Zitat antworten
Antwort


Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)
 

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.

Gehe zu


Alle Zeitangaben in WEZ +2. Es ist jetzt 10:32 Uhr.


Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Forum SEO by Zoints
© 2009 FSL Verlag