Jump to content

Regexp to determine if string contains number


Recommended Posts

Yeah and you can debug your pattern and see it at work step by step.

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)

Link to comment
Share on other sites

jchd,

The goal is to create a tool for tracing function calls, including showing the values of variables that are passed to a function.

At this time, it is at the experimental stage. The script is about 140 lines of code at this point.

I will test the script with the cases you have found to fail. More test cases are welcome.

How StrParseDelims() and StringSplit(...,...2) differ

StringSplit('Local $var = Foo($a,25)',' $(,',2)

returns

["Local","","var","=","Foo",'"","a","25)"]
StrParseDelims('Local $var = Foo($a,25)',' $,(',$delimsVec)

returns the same thing, and also identifies the delimiters in $delimsVec:

[" ","$", " ", " ","(',"$",","]

You may be correct: it may not be possible to make my script robust enough.

An objective is to do as Function Trace now does: it inserts lines into a script to be debugged, but Function Trace only calls native functions and macros. My tool will (if I succeed!) add 2 lines ahead (or after) of a function call. If the subject script has the line $t = foo($a,$b), and at this point $a is 23 and $b 'cat':

Local ___paramsVec = [$a,$b]
___TraceCall('Foo($a,$b)',___paramsVec)

will be inserted into the subject script ahead (or after) the call to foo()

and the function ___TraceCall() will end with calling ConsoleWrite() to write Foo(23,'cat') , assuming that the values of $a and $b are 23 and 'cat' respectively.

___TraceCall() will be defined in an included .au3 file.

BTW Do you know where SciTE's code for syntax coloring is? It might give me a few clues.

Edited by c.haslam
Spoiler

CDebug Dumps values of variables including arrays and DLL structs, to a GUI, to the Console, and to the Clipboard

 

Link to comment
Share on other sites

I now believe that we're outpassing this thread objectives'. You should create a new one dedicated to your context.

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)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...