Dynamic Function Tester (Preview RegEx)

Post your working scripts, libraries and tools for AHK v1.1 and older
User avatar
Pulover
Posts: 612
Joined: 29 Sep 2013, 19:51
Location: Brazil
Contact:

Dynamic Function Tester (Preview RegEx)

Post by Pulover » 04 Oct 2013, 07:11

Test & Preview Functions

I made this mostly to help me test RegExMatch & RegExReplace and see the results before using them in my scripts, but it works with other built-in functions as well and you can add your own using #Include.

Image

Features:
  • Displays parameters and default values.
  • Updates Result on-the-fly.
  • Displays function already formated to be used in scripts.
  • You can #Include user-defined functions (you can add the syntax to list in the beginning of the script).
  • Use Expressions & Functions in the parameters*.
* For this you'll need an additional function to evaluate expressions in strings. Save the file to the same folder, then you just have to type the name of the function in the beginning of this script (ExpFunc := "FunctionName") and #Include the name of the file at the bottom. When this option is enabled quotes are required around strings.
This feature is tested to work with:
Note: If you choose to use Fincs' version you'll have to remove the MsgBox from line 36 in his script to avoid error messages while typing the parameters.

** Not all functions in the list will work but I keep them for reference only.
DynamicFunctionTester.ahk
:arrow: Download from GitHub (Right-Click > Save As)
Spoiler
Last edited by Pulover on 09 Feb 2016, 20:54, edited 1 time in total.
Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)

Guest10
Posts: 578
Joined: 01 Oct 2013, 02:50

Re: Dynamic Function Tester (Preview RegEx)

Post by Guest10 » 13 Oct 2013, 05:57

so does this allow testing of ANY & ALL Regular Expressions?

User avatar
Pulover
Posts: 612
Joined: 29 Sep 2013, 19:51
Location: Brazil
Contact:

Re: Dynamic Function Tester (Preview RegEx)

Post by Pulover » 13 Oct 2013, 10:20

Well, possibly yes. I've been using it for a long time and can't remember any situation where it will fail. I use it to test regular expressions even in other programming languages.
Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)

User avatar
tank
Posts: 3129
Joined: 28 Sep 2013, 22:15
Location: CarrolltonTX
Contact:

Re: Dynamic Function Tester (Preview RegEx)

Post by tank » 13 Oct 2013, 11:10

Pulover I have been a programmer professionally for better than 10 years much longer before that. I have untill 3 years ago managed to avoid regex. I imagine newbies as well as people like me would benefit from a library function to store commonly used expressions with a description. Similarly some of the more common ones as well. phone email html etc
finally a link to some good web tutorial on regex. Sinkfaze wrote a very nice on in the old forum. honestly i refer to it alot now
We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed;
Telegram is the best way to reach me
https://t.me/ttnnkkrr
If you have forum suggestions please submit a
Check Out WebWriter

Guest10
Posts: 578
Joined: 01 Oct 2013, 02:50

Re: Dynamic Function Tester (Preview RegEx)

Post by Guest10 » 13 Oct 2013, 11:15

where the link to Sinkfaze's tutorial? thanks!

User avatar
tank
Posts: 3129
Joined: 28 Sep 2013, 22:15
Location: CarrolltonTX
Contact:

Re: Dynamic Function Tester (Preview RegEx)

Post by tank » 13 Oct 2013, 11:47

We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed;
Telegram is the best way to reach me
https://t.me/ttnnkkrr
If you have forum suggestions please submit a
Check Out WebWriter

User avatar
Pulover
Posts: 612
Joined: 29 Sep 2013, 19:51
Location: Brazil
Contact:

Re: Dynamic Function Tester (Preview RegEx)

Post by Pulover » 14 Oct 2013, 05:31

Tank, I have actually learned RegEx from Sinkfaze's tutorial too. Like most everyone I've found regex complex at first, but today I can say that many of the things I did in my scripts would have been very difficult to achieve without it.

I'm interesting in working on this function to simplify or teach regex in an easier way. Could you elaborate more on your idea? Would be something like calling a function with a parameter like "phone" or "span" to match pre-made expressions? Or would it be more beneficial a graphic program to write expressions with human readable options like "numbers", "letters", "any character", "match at the beginning", etc...?
Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)

Guest10
Posts: 578
Joined: 01 Oct 2013, 02:50

Re: Dynamic Function Tester (Preview RegEx)

Post by Guest10 » 14 Oct 2013, 07:34

does it mean i can go from zero to hero by reading Sinkfaze's tutorial ONLY? i have already copied those 3 pages of tutorial and saved them in portable PDF files for convenience. :lol:

Post Reply

Return to “Scripts and Functions (v1)”