Im XP Command Konsolenfenster textstrings vergleiche
Hallo Team
ich suche nach einer Möglichkeit in DOS-Fenster von XP einen Textstring-Vergleich durchzuführen.
in Form eines Batch-Programmes
So etwa
txt1="Hallo Welt"
txt2="o W"
txt3="lt"
Wenn der txt2 zum Teil, bzw anteilsweise dem txt1 entspricht ( Rumpfsequenz txt2 in txt1 vorhanden ), gib true aus.
Wenn der txt3 zum Teil, bzw anteilsweise dem txt1 entspricht ( Rumpfsequenz txt2 in txt1 vorhanden ), gib true aus.
Weiss jmd etwas hierzu ?
dank euch im Vorraus.
Gruß rsadmchef
ich suche nach einer Möglichkeit in DOS-Fenster von XP einen Textstring-Vergleich durchzuführen.
in Form eines Batch-Programmes
So etwa
txt1="Hallo Welt"
txt2="o W"
txt3="lt"
Wenn der txt2 zum Teil, bzw anteilsweise dem txt1 entspricht ( Rumpfsequenz txt2 in txt1 vorhanden ), gib true aus.
Wenn der txt3 zum Teil, bzw anteilsweise dem txt1 entspricht ( Rumpfsequenz txt2 in txt1 vorhanden ), gib true aus.
Weiss jmd etwas hierzu ?
dank euch im Vorraus.
Gruß rsadmchef
Please also mark the comments that contributed to the solution of the article
Content-Key: 217336
Url: https://administrator.de/contentid/217336
Printed on: April 27, 2024 at 00:04 o'clock
4 Comments
Latest comment
Hallo rsadmchef,
schau doch mal unter http://de.wikibooks.org/wiki/Batch-Programmierung:_Batch-Befehle#Syntax ....
Hier im Forum wurde das Thema CMD und Operator == auch schon oft behandlet.
Gruß
Netzheimer
schau doch mal unter http://de.wikibooks.org/wiki/Batch-Programmierung:_Batch-Befehle#Syntax ....
Hier im Forum wurde das Thema CMD und Operator == auch schon oft behandlet.
Gruß
Netzheimer
KA was du mit kleiner/groesser meinst. Ich dachte an sowas:
lg.
@ECHO OFF &SETLOCAL
SET "txt1=Hallo Welt"
SET "txt2=o W"
SET "txt3=lt"
SET "txt4=blah"
FOR /L %%A IN (2,1,4) DO ECHO %TXT1%|CALL FINDSTR "%%TXT%%A%%" >NUL && (
CALL ECHO "%%TXT%%A%%" ist in "%txt1%" enthalten.
) || (
CALL ECHO "%%TXT%%A%%" ist in "%txt1%" NICHT enthalten.
)