Get the App
SLTechnology News&Howtos  ›  Development  › 

How does batch process find the first data string in a row

Shulou Source: shulou.com Published: 2022-06-03 06:29:23 10月02日 Update

This article mainly introduces the batch processing how to find the first data string in the row, which has a certain reference value. Interested friends can refer to it. I hope you will gain a lot after reading this article. Let's take you to know it.

The code is as follows:

@ echo off

:: find a record that looks like

The first number string of::

:: it is obtained by detecting the type of each character, but it is very inefficient

:: code by jm 2006-10-16 CMD@XP

Set num=0

Setlocal enabledelayedexpansion

For / f "delims="% I in (input.txt) do call: intercept "% I"

Echo value=%str_%

Pause

Goto: eof

: intercept

Set str=%1

Set str=%str:~2,-2%

If not "% str%" = "" echo. "% str:~0,1%" | findstr "[0-9]" > nul & (

Set num=1&set stranded rooms stranded strings% stranded flowers 0Mague 1% conversation calls: intercept "! str:~1!") | | (

If% num% equ 0 call: intercept "! str:~1!"

)

Goto: eof

Helpless scheme, which does not rely on the relationship between characters, will get any value after value=, and the speed is very fast.

Better able to deal with the shape of input type=hidden name=id VALUE=465974855

String of

@ echo off

Setlocal enabledelayedexpansion

FOR / f "delims="% I in (input.txt) do (

Set "tasking%% I"

Set "tweezers"

Set "tweets" =! "

Set "tasking roomt: | =!"

Call: sub! t!

)

Pause

Goto: eof

: sub

If "% 1" = "" exit / b

If "% F%" = "1" echo 1 & set Fidel0

If "% 1" = = "value" set Fair1

Shift

Goto sub

Thank you for reading this article carefully. I hope the article "how to find the first data string in a row" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Tags: Articles characters data low helpless code value interest at the same time string efficiency number scheme helplessness more friends knowledge type tape industry Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Microsoft Shulou Technology Huawei NVidia