UE REGEX tutor integration for PERL-REGEX?

Find, replace, find in files, replace in files, regular expressions

UE REGEX tutor integration for PERL-REGEX?

Postby teodz1984 » Mon Jan 14, 2008 5:09 am

I would love it if you could integrate a coaching application for REGEX such as

EXPRESSO 3.0 (FREEWARE)
website: http://www.ultrapico.com/Expresso.htm
download link: http://www.ultrapico.com/ExpressoSetup3.msi

Microsoft .NET Framework Version 2.0 Redistributable Package (x86) required:
http://www.microsoft.com/downloads/deta ... laylang=en

or

REGEXBUDDY
http://www.regexbuddy.com/


This would prob help a lot of PERL-flavored REGEX newbies like me.

Another suggestion would be a pull down menu when you activate the REGEX option on the find menu so you can put REGEX constructs on the search and replace input boxes (ala EEmurasoft's EMEDIT).
User avatar
teodz1984
Newbie
 
Posts: 1
Joined: Sun Jan 13, 2008 12:00 am

Re: UE REGEX tutor integration for PERL-REGEX?

Postby pietzcker » Thu Jan 17, 2008 9:02 am

I have integrated already RegexBuddy as a user tool using the command line

"C:\Program Files\JGsoft\RegexBuddy3\RegexBuddy.exe" -getfromclipboard -putonclipboard -appname "UltraEdit-32" /testfile "%f"

This does the following:
  • take whatever is in the clipboard and pass this to Regexbuddy as the regex to be edited.
  • take the current file and pass it to RB as the file to test the regex on in a risk-free way. (The parameter /testfile is currently undocumented but works well. You might want to set the option "save current file first" in the tool configuration dialog.)
  • in RegexBuddy, clicking on "Send" will copy the edited regex into the clipboard and exit RB.
Of course, you can set it up differently. E.g., if you don't need a regex for the current file but rather want RB to create a regex string that can be used in a program you're editing (to automatically get all the backslashes right in a C++ string), then you wouldn't use the /testfile parameter but rather the -string parameter etc. See the Regexbuddy documentation for more details).

HTH,
Tim
User avatar
pietzcker
Master
Master
 
Posts: 241
Joined: Sun Aug 22, 2004 11:00 pm

Re: UE REGEX tutor integration for PERL-REGEX?

Postby sklad2 » Wed Apr 01, 2009 2:58 pm

works!!! great !!!

thanks again for the great tip!!!
User avatar
sklad2
Advanced User
Advanced User
 
Posts: 59
Joined: Thu Mar 08, 2007 12:00 am

Re: UE REGEX tutor integration for PERL-REGEX?

Postby sklad2 » Fri Jun 04, 2010 8:55 am

I am using v16.10.0.1025 of UE and v3.4.2 of regex buddy.

I have in UE -> Advanced Tool Configuration the following
Regex Buddy
"C:\Program Files\JGsoft\RegexBuddy3\RegexBuddy.exe" -getfromclipboard -putonclipboard -appname "UltraEdit-32" /testfile "%f"
c:\temp

Nothing for the toolbar bitmap.
Now, when I run regex buddy from the Advanced menu I see

  • If Dos is checked no error message.
    The file is copied into regexbuddy.
    The command line above is copied into the regex epxression, unless I do a copy to the clipboard of the regex.
  • If Windows is checked I get a message box saying it is unable to create file for write, but the operation was successful.
    ????
Using either one, I am unable to get modifed text from the regex buddy back into UE.
Is it possible to get both the modified regex and the modified text back into UE?

TIA,
Steven
User avatar
sklad2
Advanced User
Advanced User
 
Posts: 59
Joined: Thu Mar 08, 2007 12:00 am

Re: UE REGEX tutor integration for PERL-REGEX?

Postby pietzcker » Fri Jun 04, 2010 2:45 pm

This tool command needs to have the "Windows program" radio button checked. It assumes that the current file has been saved to disk (you might want to turn on the option "Save current file first"), and that the clipboard contains the regular expression that you want to edit. After leaving RegexBuddy via its Send button, the edited regex will be in the clipboard.

There is no way to get the modified text itself back into UE unless you use RegexBuddy to save it under the same filename.
User avatar
pietzcker
Master
Master
 
Posts: 241
Joined: Sun Aug 22, 2004 11:00 pm

Re: UE REGEX tutor integration for PERL-REGEX?

Postby sklad2 » Fri Jun 24, 2011 3:06 pm

For us 64 Bit Windows folks use

"C:\Program Files (x86)\JGsoft\RegexBuddy3\RegexBuddy.exe" -getfromclipboard -putonclipboard -appname "UltraEdit-32" /testfile "%f"
to run regex buddy. It works great!!!
User avatar
sklad2
Advanced User
Advanced User
 
Posts: 59
Joined: Thu Mar 08, 2007 12:00 am


Return to Find/Replace/Regular Expressions