0 Pluspunkte 0 Minuspunkte

Angenommen ich habe einen String

Hello world, today is not a good day

und möchte das "not" daraus entfernen wie mache ich das?

von  

2 Antworten

0 Pluspunkte 0 Minuspunkte

Hier hast du ein Beispiel dazu

@echo off
setlocal

SET "source=Hello world, today is not a good day"
SET "target= not"
call set result=%%source:%target%=%%
echo %result%
von (716 Punkte)  
0 Pluspunkte 0 Minuspunkte
@echo off
setlocal enableDelayedExpansion
set str=Hello world, today is not a good day.
set str=%str:not =%
echo %str%
von