Jump to content

Recommended Posts

Posted (edited)

#include <Excel.au3>
#include <file.au3>
#include<array.au3>
$file=@MyDocumentsDir&"\My New Book 1.xlsx"


$reg=StringRegExp($file,"(?<=\\).*(?=\.)",3)


if IsArray($reg) then _ArrayDisplay($reg)

anyone know why this isnt capturing the "My New Book 1"

Many thanks in advance.

Edited by Aceguy
Posted

$file = @MyDocumentsDir & "\My New Book 1.xlsx"
ConsoleWrite(StringRegExpReplace($file, '^.*\\|\.[^.]*$', '\1') & @LF)

 

  Reveal hidden contents

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Posted

  Aceguy said:

thanks guys... solved

@weaponx yourhelp=none

Yea your topic will be really helpful when someone searches titles for "StringRegExp" ...

Posted

  Aceguy said:

thanks guys... solved

@weaponx yourhelp=none

He helping a lot on this forum, you should understand it at least from his status... and you really didn't gave as complete information, some of as had to enable our magic skills of “mind reading” to understand the problem :)

So please, next time (and even now you can edit your post) be more specific, don't leave to the others the work you should do yourself, next time others just might not help you only because of this (lack of info).

 

  Reveal hidden contents

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

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...