Jump to content

Regex toolkit


nend
 Share

Recommended Posts

2 hours ago, nend said:

Why do you believe it's better without it?

I don't remember very clearly the discussion here in the forums, but I remember it was useless. Try a compiled script with it and without it. You'll find that is not needed. Try for yourself.

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Link to comment
Share on other sites

It's not needed because it actually makes your script much slower with a large amount of data. What this function does is takes the memory used by the program and dumps it to disk in the page file. Reading data from a file is many times slower than reading the same data from memory. Also, having more free memory means that all the money you spent on that 16Gbs of memory was a waste, because you're not actually using it. This was a useless holdover from the XP days, and wasn't even needed back then either.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

Seems to be a very handy RegEx tool. :thumbsup:

My three suggestions:

  1. import text from clipboard
  2. resizeable GUI for larger edit controls
  3. show/hide functionality of the right help panel to make the GUI more compact

 

Drag'n drop doesn't load the text file.

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

3 hours ago, UEZ said:

Seems to be a very handy RegEx tool. :thumbsup:

My three suggestions:

  1. import text from clipboard
  2. resizeable GUI for larger edit controls
  3. show/hide functionality of the right help panel to make the GUI more compact

 

Drag'n drop doesn't load the text file.

Thanks!!

1. import text from clipboard

Good idea!

2. resizeable GUI for larger edit controls

I've tryed that but the "Regular expression output data" edit control wouldn't resize right, I think it has something to do this one is the middle.

3. show/hide functionality of the right help panel to make the GUI more compact

Also a good idea, I will look into it

Drag'n drop doesn't load the text file.

The drag'n drop is only for the export file to import (*.ini file)

Link to comment
Share on other sites

  • 7 months later...

Hi there, could this tool generate autoit code from this tool?

I'm using the match and replace option and then manually writing StringRegExpReplace() function, but the code does not work as described in the Regex toolkit, presumably I don't know what function I should use, hence the request

 

Link to comment
Share on other sites

On 1-12-2017 at 1:07 AM, NDog said:

Hi there, could this tool generate autoit code from this tool?

I'm using the match and replace option and then manually writing StringRegExpReplace() function, but the code does not work as described in the Regex toolkit, presumably I don't know what function I should use, hence the request

 

I made a new version where this is possible, see the latest version (V1.3.0).

Link to comment
Share on other sites

  • 2 months later...

I rewrote the program StringRegExpGui that is distributed with AutoIT3 and can be found in the \Examples\Helpfile folder. The RegExGui published today is a total remake and offers the following improvements:

Examples
Built-in and instant accessible with a menu. There are six instructional applications for finding names, phone numbers, dates, and the like. The direct and fast operation allows the user to take the lead in the little-practiced box of pattern recognition. Thanks FritsW.

Daring
All examples start with multiple finds that match the specified pattern. In addition, each match is immediately shown and dissected into parts. This is in contrast to software that starts with a single match or just the observation that a match has taken place. With the direct approach, the user jumps straight into the deep and can simplify the example as desired. This depth with RegExGui gives the best preparation for practical use.

User-friendly
On the screen is a ruler with numbers, so that an unexpected error in the manufacture of a pattern is now more quickly solved. Added are a number of tooltips. At will, the user can adjust and / or save the sample patterns.

Growth
The examples include links to sites that explain advanced regular expressions or provide tools. Furthermore, a link to a site for healthy food. Thanks JolandeS.

The width of the dialog window of the program is adjustable. As patterns are better controlled, the user may want to go to long expressions. They can then remain completely in the picture. Thanks Melba23.

Presentation
Multiple results are presented in a two-dimensional way. Each match at the beginning of a line, optional decomposition of components in subsequent columns. As a result, a match will continue to be distinguished from a part that belongs to another match.

The program now has a 256-bit icon with alpha transparency.

Bright
Textual explanations are given with the results. A lime background color is chosen for the status field. This improves the contrast. Thanks EmileR.

Repair of errors
A diagnosis has now been made regarding the exchange of detail - with primary match data in the results, when using the options Match and All matches. Until it is repaired, users can use the Match + detail and Ales Matches + details options.

A bug in StringRegExpGui - the unexpected disappearance of all saved patterns - has been fixed. Thank LeaB. With RegExGUi, the patterns remain in the inifile in the same folder as the program.

Happy
Few users are aware of the invisibly different codings of the alphabet hidden under water in text files. Since the new millennium the use of unicode has been growing, it has many advantages. Here and there are 8 bit codings. They traversed searching in the past and especially finding it. Again without users knowing this, they have only experienced fruitlessness. The RegExGui presented here relieves the user for that matter in the whole. The program takes care of encoding and always comes up with the most complete results that fit your pattern, thanks DominiqueH.

Efficient code
Compared to the StringRegExpGui, the source code of RegExGui is shorter.

      Bert Kerkhof, analyst and programmer

      Download: https://github.com/BertKerkhof/RegExGui   

Please comment
 

RegExGui.source.au3

Link to comment
Share on other sites

Dear Nend,

After uploading RegExGui yesterday, I saw your RegEx toolkit and looked at it.

All praise for the fold-out window with the handy reminder of RegEx codes. Nend is looking for new ways to draw attention to an error in the specified pattern through the color of the pattern field. This is interesting.

A try of entering text data via a website url was not successful, the program breaks down.

For making multiple matches, the toolkit has chosen 'Array of matches'. When you take the example "Time" from RegExGui into the toolkit, the output box shows 11 numbers instead of 5 matches. Making something usefull from these 11 numbers is not possible. It happens that string parts have been requested in the pattern string, nevertheless, these parts occur in many patterns. Suggestion is the use in the toolkit of 'Array of matches and details' as the supreme method for multiple matches.

Good idea to include the Replace option in the toolkit. The option immediately demonstrates the usefulness of requesting string sections: with  use of parameters $1 $2 $3, parts of the match can come back up in the output. For example: use the "Date" example and then fill in the Replace field "$2 $1th" (without quotes). Then "17 Apr 1997" changes to "Apr 17th".

The examples built into RegExGui help users cross a threshold. Feel free to take over my examples in the toolkit. The point is that regular expressions should be better utilized: IT gives programmers power.

Link to comment
Share on other sites

  • 2 weeks later...

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
 Share

×
×
  • Create New...