Jump to content

Recommended Posts

Posted

Hey :)

i'd like to read a txt file containing letters, and i want to move them into another txt file, but to move only the words that dont contain a "-" and that are smaller than 6 letters

is that possible?

Posted

maybe not the most efficient way but it should work.

#include <Array.au3>
#include <File.au3>


Local $Data=FileRead("au.txt")

$Data=StringRegExpReplace($Data,"[A-Za-z_]{6,}",".")
$Data=StringRegExp($Data,"[A-Za-z]{1,5}",3)

_ArrayDisplay($Data)

_FileWriteFromArray("newau.txt",$Data)

Saludos

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...