Recently Browsing 0 members
No registered users viewing this page.
I am new to autoit so please if someone could help me. I am trying to combine multiple .txt files but I can't get it right. In every file are the exact amout of lines ( for example here are 2 ) , I don't want to make it for just 2 lines for each txt files but for all the lines the txt files contains. The thing I want to do is :
Text File 1
Hello my name
I am a big
Text File 2
Potato head for
Text File 3
and I like to eat pizza.
Not getting this right.
------------------- Combine them all into one txt file like here ------------------------------
Final Text file
Hello my name is Fred, and I like to eat pizza.
I am a big Potato head for Not getting this right.
Thanks for any advice!
P.S. Sorry for my English, not my first language.
I have a problem with getting first 10 characters with a big txt file, about 50k lines. I only want 10 characters of each line and save it into another file. I tried to use Stringleft every line and save it into another file but it was really slow to do it. I tried to save it into a variation like $var=$var&stringleft($file,10)&@CRLF. It's faster but still really slow.
Can anybody help me with this
Thank you so much
Is there a way to output the regex matches into a file?
I have a script to compare two files and check for regex matches.
I want to output the matching regex of 'testexample.txt' to another file.
#include <MsgBoxConstants.au3> #include <Array.au3> $Read = FileReadToArray("C:\Users\admin\Documents\testexample.txt") $Dictionary = FileReadToArray("C:\Users\admin\Documents\example.txt") For $p = 0 To UBound($Dictionary) - 1 Step 1 $pattern = $Dictionary[$p] For $i = 0 To UBound($Read) - 1 Step 1 $regex = $Read[$i] If StringRegExp($regex, $pattern, 0) Then MsgBox(0, "ResultsPass", "The string is in the file, highlighted strings: " ) Else MsgBox(0, "ResultsFail", "The string isn't in the file.") EndIf Next Next
I need some help to parse the Green highlighted value with from below text:
RESISTOR THICK FILM 4.64K ±1% 1/4W ±100PPM/°C 1206 SMT
RESISTOR THICK FILM 3.83K ±1% 1/4W ±100PPM/°C 1206 SMT
RESISTOR CARBON FILM 22K ±10% 1/2W AXIAL THT
RESISTOR WIREWOUND 22 ±5% 3W ±30PPM/°C AXIAL THT
RESISTOR METAL OXIDE 4.7K ±5% 2 W ±300PPM/°C AXIAL THT
RESISTOR THICK FILM 0 1/8W 0805 SMT
I am using positive look behind.:
(?<=FILM|WOUND|OXIDE).+ Can only pull this off:
4.64K ±1% 1/4W ±100PPM/°C 1206 SMT 3.83K ±1% 1/4W ±100PPM/°C 1206 SMT 22K ±10% 1/2W AXIAL THT 22 ±5% 3W ±30PPM/°C AXIAL THT 4.7K ±5% 2 W ±300PPM/°C AXIAL THT 0 1/8W 0805 SMT I'm trying the \b word boundary to no avail at this point. Appreciate if anyone would guide me on this?