Jump to content
neogia

Stringregexp Guide

Recommended Posts

I have updated StringRegExpGUI to work with the new StringRegExp inplementation.

I have taken the opportunity to add in a timer (this shows how long the StringRegExp part takes) and a status bar and a little bit of colour.

As usual - if anyone has any suggestions, please get back to me.

Needs beta.

At the moment when you run the script using Scite - you get the fllowing error message - just press Continue..

StrRegExpGUI.au3(133,86) : ERROR: StringRegExp() [built-in] called with wrong number of args.

This should be fixed in next update of Scite

StrRegExpGUI.au3

Share this post


Link to post
Share on other sites

if StringRegExp($EmailAdds, "\<[-\w\d.%]+@[-\w\d.]+\.\a{2,4}\>") ThenoÝ÷ Ù«­¢+ØÀÌØíµ¥±½Õ¹ôMÑÉ¥¹IáÀ ÀÌØíQáаÅÕ½Ðì¡l´ÀäÈíÜÀäÈí¸t­l´ÀäÈíÜÀäÈí¹t¬ÀäÈì¸ÀäÈíìÈ°Ñô¤ÅÕ½Ðì°Ì¤oÝ÷ Ù«­¢+Ù5Í    ½à À°ÅÕ½Ðí½ÉµÑѽÈÑÍ¥¹ÍÉÑ¥½¸ÅÕ½Ðì°}MÑÉ¥¹AɽÁÈ¡MÑÉ¥¹IáÁIÁ± ÀÌØí1ÍÑ9µ°ÅÕ½Ðímx´ÀäÈíÜÀäÈíuñ)ÈÀäÈ츨ÀäÈìÐíñ©ÈÀäÈ츨ÀäÈìÐìÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ð줤

Edited by this-is-me

Share this post


Link to post
Share on other sites

Just an FYI to anyone who is new to regular expressions - these are not a new concept, nor are they special to AutoIt. Anyone who has experience with Unix/Posix, Perl, or Tcl, for example, would be familiar with regular expressions.

Here's the wikipedia page for regular expressions:

http://en.wikipedia.org/wiki/Regular_expression

The point is, if you learn regular expressions, that knowlede will be useful to you beyond just AutoIt.

I do not know if there is already a Autoithelp for this, but your link looks great (the manual or WikiPedia) I do not know if it is all, or is something missing in there.

Is it not possible that somebody who understand well this new strRegExp, can correct it with colours and notes to show the the differences (exceptions) of Autoits version? So that we can learn something else.

Also To Add at the end, of this manual a top 30 searches from sTRregExp, so that we can take when necessary?,

I think with this 2 help points most of the Scripters would start with such a udf.

Share this post


Link to post
Share on other sites

Great tut... I really have needed to use RE's in the past, but never took the time to learn it.

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

Yep, I reckon that the new StringRegExp implementation is between 2x and 10x as fast for the sorts of StringRegExp tests that I run. :lmao:

Share this post


Link to post
Share on other sites
On 3/24/2006 at 3:08 PM, steve8tch said:

A number of people have already downloaded it.

I would urge poeple who are learning this function to use it.

StrRegExpGUI.au3

Fantastic! Thank you very much for this!!!

I was no longer able to use Expresso because it required Microsoft.NET, which was creating a problem on my WinXP machine. So I had to uninstall .NET. Now I can test expressions once again!

Share this post


Link to post
Share on other sites

Please try http://regex101.com/ it's a very good PCRE regexp testing and debugging resource.


This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Share this post


Link to post
Share on other sites

Frustrated! 

$line_array = StringRegExp("C:\Program Files (x86)\Adobe\Acrobat Reader DC", '????????', ?)

I need

Reverse the string.

Look for "\" with StringInStr

Trim the right side from the return of StringinStr

 

In summary

In = C:\Program Files (x86)\Adobe\Acrobat Reader DC

Out = Acrobat Reader DC

 

any ideas?
 

Share this post


Link to post
Share on other sites

Reverse? No.

$PgmName = StringRegExpReplace("C:\Program Files (x86)\Adobe\Acrobat Reader DC", '(.*\\)(?=[^\\]*)', '')

 


This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

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

×
×
  • Create New...