+ Reply to Thread
Results 1 to 2 of 2

Regular Expression Pattern Testing Add-In

  1. #1
    Forum Contributor
    Join Date
    12-28-2011
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    280

    Regular Expression Pattern Testing Add-In

    For those that enjoy playing with Regular Expressions, I hope you find the following Add-In useful:

    https://skydrive.live.com/?cid=F5B94...770FB324%21105

    Download it to a location of your choice and install it in your Excel via Office button/File Ribbon>Options/Excel Options>Add-Ins>Manage Add-Ins.

    How to use it

    1. It adds an additional option to the right-click Cell menu (that should appear at the bottom) named "RegExp Tester".
    2. Clicking on this will load a userform. The contents of the active cell are loaded into the large text box and you can also edit this text as you require, or clicking on another cell will load the contents of that cell to the box.
    3. The above is the text you want to match against. The pattern to match with goes into the smaller textbox at the top. As soon as you start typing in a pattern, the match will be displayed in the larger text box in bold red underlined text.
    4. There are 3 vbscript regular expression settings which can be made via checking the checkboxes on the right hand side. Please note that Multiline is an undocumented property of the vbscript regexp object.
    5. There is a "Copy Pattern To Clipboad" button which copies the entered pattern to the clipboard.
    6. Finally there is a further checkbox "Disable Match Text update" whose purpose is simply to disable automatic loading of a newly selected cell's contents to the larger textbox (this is useful in case you want to copy a pattern to the clipboard and enter it into a blank cell without losing the contents of the larger textbox).


    Points to note

    I have only tested this on xl2010. I have no other versions until I return to work to test against.

    The userform contains Microsoft's InkEdit control. I have no idea how compatible this is with other Excel versions.

    The userform uses Andy Pope's form resizing code (thank you Andy!) to permit dynamic resizing when the Userform has been loaded.

    I would appreciate any and all feedback as it has so far only had very limited testing (just me over the last day.

    Hope it proves useful to you

  2. #2
    Forum Contributor
    Join Date
    12-28-2011
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    280

    Re: Regular Expression Pattern Testing Add-In

    I have now updated the code (current version on Skydrive is version 4) and have dealt with a few issues identified over at MrExcel.com. Apparently, it seems to work in xl2007 so I have hope it might work in 2003 too (no means to test this though I'm afraid), compatibility pack allowing.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1