|You'll have to put quotes around each element in the validation set, but then you can add the space. Like:|
for %%a in ("A","B"," ","0") do if %%a equ "%dr_narr:~0,1%" goto CHAR)
Note that you do NOT use quotes around %%a because they're already included in it.
Here's another method that seemed to work:
::==== begin script
@echo off & setlocal enabledelayedexpansion
set alpha=abcdefghijklmnopqrstuvwxyz 0123456789
set test=testing valid 09
for /L %%a in (0,1,100) do (
:: end of test-string reached, it is "good"
if "!t!" equ "" goto :okproceed
if !t! equ fail echo failed at char# %%a&goto :eof
:: string longer than arbitrary "100"
if "%alpha%" equ "!alpha:%t!%=*!" echo fail: %t%&set t=fail
::note, the entire string has been validated
echo ok, proceeding with batch
::======= end sample snippet batch
note that you do have to use enabledelayedexpansion and a called sub, but it is shorter than the other way.
ps: edited to fix my transcription mistakes.