Collections:
Other Resources:
String Variable Match and Replace
How to perform sub-string match and replacement in a string batch variable?
✍: FYIcenter.com
You can perform a sub-string match and replacement in a string batch variable using the following variable modifier:
%variable:pattern=str%
Wildcard character "*" can be used in "pattern" to match any number of any characters.
Examples of string match and replacement modifiers:
rem Remove all double quotes from a string set variable=%variable:"=% rem Replace all "bar" to "foo" set variable=%variable:bar=foo% rem Remove the drive letter from a path name set java_home=%java_home:*:\=\%
⇒ Get Sub-String from Variable
⇐ What Are Batch Built-in Variables
2021-10-10, 1712🔥, 0💬
Popular Posts:
How to remove AcroIEHelper.dll - Adobe Acrobat IE Helper Version 6.0 for ActiveX? DLL AcroIEHelper.d...
Can I remove startup application "YahooMessenger.exe - Yahoo Instant Messenger" to speedup my comput...
How to remove AcroIEHelper.dll - Adobe Acrobat IE Helper Version 6.0 for ActiveX? DLL AcroIEHelper.d...
I have a field in a MS Access form that is a foreign key pointing to another table. Can I use a comb...
What is Scheduler.exe - Process - HP Backup Scheduler? Process Scheduler.exe is the backup scheduler...