Jump to content
Sign in to follow this  
Watson

Regular Expressions

Recommended Posts

Watson

Hello guys!

Today I happened to download a program called RegexBuddy

This performs its function perfectly, but no such strings for AutoIt.

I ask you if you can translate this string into AutoIt.

\b[a-z]:\\ # Drive

(?:[^\\/:*?"<>|\r\n]+\\)* # Folder

[^\\/:*?"<>|\r\n]* # File

\b[a-z]:\\(?:[^\\/:*?"<>|\r\n]+\\)*[^\\/:*?"<>|\r\n]*

In addition, the string "[az]", should not be corrected ... should not be: "[a-zA-Z]"? Thus, "[:alpha:]"?

I also ask if everything can be limited to a few extensions: *.png and *.jpg

Share this post


Link to post
Share on other sites
shanet

Watson, as far as I am aware there is no support for regular expressions in AutoIt.


[font="Comic Sans MS"]My code does not have bugs! It just develops random features.[/font]My Projects[list][*]Live Streaming (Not my project, but my edited version)[right]AutoIt Wrappers![/right][/list]Pure randomness[list][*]Small Minds.......................................................................................................[size="1"]Simple progress bar that changes direction at either sides.[/size][*]ChristmasIt AutoIt Christmas Theme..........................................................[size="1"]I WAS BOOOORED![/size][*]DriveToy..............................................................................................................[size="1"]Simple joke script. Trick your friends into thinking their computer drive is haywire![/size][/list]In Development[list][*]Your Background Task Organiser[*]AInstall Second Generation[/list]BEFORE POSTING ON THE FORUMS, TRY THIS:
%programfiles%/AutoIt3/autoit3.chm

Share this post


Link to post
Share on other sites
SmOke_N

Watson, as far as I am aware there is no support for regular expressions in AutoIt.

No?

StringRegExp()

StringRegExpReplace()

?

It uses the PCRE Regex engine.


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
GEOSoft

RegExBuddy and most other RegEx testing programs will not always get PCRE expressions correct. 90% of the time they work fine but then you hit one that is not going to work.

There is a PCRE toolkit in my signature that handles PCRE as used in AutoIt.

Another choice which I found better than ReExBuddy is Expresso.


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites
shanet

I stand corrected :)

Thank you SmOke_N :mellow:


[font="Comic Sans MS"]My code does not have bugs! It just develops random features.[/font]My Projects[list][*]Live Streaming (Not my project, but my edited version)[right]AutoIt Wrappers![/right][/list]Pure randomness[list][*]Small Minds.......................................................................................................[size="1"]Simple progress bar that changes direction at either sides.[/size][*]ChristmasIt AutoIt Christmas Theme..........................................................[size="1"]I WAS BOOOORED![/size][*]DriveToy..............................................................................................................[size="1"]Simple joke script. Trick your friends into thinking their computer drive is haywire![/size][/list]In Development[list][*]Your Background Task Organiser[*]AInstall Second Generation[/list]BEFORE POSTING ON THE FORUMS, TRY THIS:
%programfiles%/AutoIt3/autoit3.chm

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.