topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Wednesday December 11, 2024, 8:33 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: WildOpal - hypothetical new idea for a "find and replace" program  (Read 48345 times)

Stoic Joker

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 6,649
    • View Profile
    • Donate to Member
Re: WildOpal - hypothetical new idea for a "find and replace" program
« Reply #25 on: June 10, 2015, 08:03 AM »
Never having had time to delve into RegEx much, this looks like it will be quite handy.

Twinbee

  • Member
  • Joined in 2012
  • **
  • Posts: 84
    • View Profile
    • Donate to Member
Re: WildOpal - hypothetical new idea for a "find and replace" program
« Reply #26 on: June 10, 2015, 08:08 AM »
Ace, let me know if there's something I should really add.

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 11,190
    • View Profile
    • Donate to Member
Re: WildOpal - hypothetical new idea for a "find and replace" program
« Reply #27 on: June 10, 2015, 01:45 PM »
Be interested to see others programs that can do that if you can find one.

regexbuddy helps more with learning, while regexmagic is the alternative if you just want to make them. 

It's good to have different alternatives- I guess regexbuddy made it so I just use regex.  :D  Good job with translating it into your own language, though.

MikleB

  • Participant
  • Joined in 2014
  • *
  • Posts: 22
  • Que?
    • View Profile
    • Donate to Member
Re: WildOpal - hypothetical new idea for a "find and replace" program
« Reply #28 on: June 26, 2015, 01:58 PM »
    G'Day Twinbee.

     Thanks for a the nice program. I have stayed away from RegEx's in the past but have recently decided that I really must learn more about them and actually start to use them as they are just too powerfull a tool to ignore any longer, especially as more of the tools that I now use employ their capabilities and without some knowledge of RegEx, I just am not utilizing my resources fully. This looks as it could ease the frustration of checking for correct syntax in these expressions, at least till one becomes more familiar with them, especially for more complex ones, and that would indeed be a boon as that is my main reason for avoiding them in the past.

    No matter, your program will at least allow someone like myself to experiment at a more than basic level within this language without continually being thwarted by the fear of getting horrendously inappropriate results, thanks to the highlighting. Very usefull indeed, and provides a quick means of really getting to grips with the RegEx expression.

    A few suggestions.

    1. Some thoughts on tooltips and the helpfile in general.


  • You might want to add the regex code inserted by a button into the tooltip, for the more technical/interested users

 I also feel that this would help enormously for a third category of user:- Those new to RegEx, like myself. But I would ask for an even more, in my opinion, usefull possibility. Include the values in your help file ALSO. And while on this point, allow for your help file to be opened in a new panel that is part off or docked too the main program itself. (So that working on the text to modify does not sent send the panel out of the way but allows visual checking of what is being input {Or what still needs to be input.} as values are changed by the user.) Also add the '$' functionality to this help file as it is only in the tooltip at the present, and is a fairly complex concept to nut out.

 Tooltips and values also for the 'Many' line of buttons.  Let's be completist about this  ;) , also in the help file please.

 Tooltips for the 'Copy' buttons would be nice. A tooltip could be - "Copies the New Text to the clipboard."

NOTE: While dealing with these buttons, I must point out that your 'Copy <<<' button is really a 'Replace It <' button and a relabeling might be in order. A tooltip could be - "Will replace each occurrence of highlighted text with the text in the new text box."


2. Would it be possible without too much work to redesign the help file panel to be a little more friendly[<- MikleB EDITED 30th/June/2015 Reason: I didn't mean that it wasn't 'user' friendly. just that I wanted more functionality from it.] usefull, wether it gets docked or not. I'll explain.

 Currently this pane only has a close button. I would love for it to have ALL the special modifier buttons that the program supports with a few special functions available through their usage, these being:

A. Duplicates of the tooltips used in the main section, displayed as they are hovered over.
B. Actually pressing these buttons results on showing the help section for that button in the help pane itself to allow study of syntax of both the button's usage and the corresponding RegEx values that will be entered into the search string, so that really powerfull and very complex expressions may be built up using the viewable help as a guide and thus not having to rely on bug prone memory.

This pane would become a real boost to learning RegEx and your program, as well as a safeguard against accidentally pressing the real 'Live' buttons while trying to read a tooltip and thus messing up a partially completed string that you may not have memorised and thus rendering it effectively useless and causing much grief and heartache and the use of foul language.

A button that toggles between the aforementioned functionality for the modified help file and a new section of this help file that would only show a synopsis of ALL the button functions. I.E: Like your list of button functions.


  • Single character: .
  • Many characters: .+?
  • Repeat character: +
  • Numeric digit: \d
  • Numeric digits: \d+?
  • Newline: (\r\n|\r|\n)
  • Newlines: (\r\n|\r|\n)+?
  • Symbols: [^\s\w]+?
  • Symbol: [^\s\w]
  • Letters: [a-zA-Z]+?
  • Letter: [a-zA-Z]
  • Charset: []
  • Charset (repetitions):[]+?
  • Single whitespace char: \s
  • Multiple whitespace chars: \s+?


 This list could be placed at the end of the main help section.

A second push reverts to the original location that was left when the button was first pushed.

The scrollbar at the side of course needs to still remain so that all areas of the help file could be read as normal.


3. A third scrollbar for the main window, placed -Between- the two text areas with a button below it to activate/deactivate it, as toggled. When toggled on, it locks the two panes together so that scrolling in both panes is done simultaneously.

 If you load a big piece of text and have many areas, that will be affected by your endeavours it would be a lot easier to proofread, especially if it were to contain areas that look similar, if scrolling were to be done in unison. Either disable the other two scrollbars or allow scrolling via any of them. I think disabling would be best and automatically setting the start position to the top of both panels when this third bar is first toggled on.

 When toggling off then, the previous locations in both panes could be returned too. (Thinking as I type here that this may be a usefull feature in itself {I mean, the reverting to a previous position in the file. EG: Say you know your input file contains many similar values that you wish to modify but they have minor differences. You could look for the first occurrence of these strings, check that the modification is basically correct, lock and visually inspect the rest of the file, looking for the coloured highlights. Unlock and apply the replacements as is or further modify your expression to be more complete.}. ).


4. When you use the relabeled 'Replace It <<' button, could the newly inserted text be highlighted in any colour but not RGB - 222, 255, 222 / Hex - #DEFFDE (This is a pale green that I use systemwide as my default 'Window Colour' as it is easier on the eyes than always looking into a white 'Light Bulb'.). Well maybe not a variant of yellow as this doesn't stand out too much against my green, but a pale orange
RGB - 255, 205, 155 / Hex - #FFCD9B or a light red RGB - 255, 179, 179 / Hex - #FFB3B3 as these are good CAUTIONARY colours and standout quite well. Once the changes are OK'd by a visual inspection, this highlighting should disappear when any new alterations are done to the 'RegEx' input box.

5. A -protected- window-box, that can't be edited by hand, as a storage buffer that contains copies of full regular expression as they used to stand, only created since the program was opened on this occasion, updated via a 'Store Now' button, to be used as an area to keep 1 or more (Depending on how you feel about coding in storage buffers and drop down selection boxes.) completed regular expressions. This box should have it's own button to copy the current contents of this regular expression box to the clipboard for using in other environments or work situations as required. This would allow creating a list of usefull strings that could be kept for future use, and to easily revert to a better version of what you are currently working on if your newer versions are wrong. Another linked button would copy these strings back into the 'In Use' area for use or modification.

6. Would it be possible to have the system context menus available in the text areas as I wished to use some of their functionality and feel that cut and pasting in this area could be very usefull? This would bring another level of usefullness to the general editing capabilities inherent in your program.


I have made a composite graphic, aided by the excellent Screenshot Captor program (Shamless plug for mouser's work, I love how it has changed the way I do a lot of things since I've been using it!), of what this redesigned program would look like just to clarify a bit more. And in my opinion it would be, pretty much - "Polished till it gleams 8) !"



WildGem - MikleB-1.PNGWildOpal - hypothetical new idea for a "find and replace" program


Even if you totally ignore all these ideas I really do appreciate this program  :Thmbsup:, it's just that I feel with these things attended too it could be so much more than it currently is, a text modifying tool that allows using Regular Expressions in a very powerful manner with little or no experience, a great Regular Expression learning, prototyping and go-to tool.


Sincerely

Michael


OH, sorry to add ANOTHER request, but I just posted this and then decided to add WildGem to a program that I use, as a launch button and I noticed that it didn't have a nice, distinguishable icon. If it weren't to be too much trouble... Maybe... Please. And Thanks again. [▉ :'( ▉]



Editings Legend; AND Reason for Edit/Modifications Applied. Performed: 30th/June/2015
-=- -=- -=- -=- -=- -=- -=- -=- -=- -=- -=- -=- -=- -=- -=- -=- -=- -=- -=- -=- -=-

Additions to rectify Bad Grammar. ... (Fix = Shown as green text.) ~ 1x instance(s).
Clarification of Intent. ................... (Fix = Strikethrough may be applied if wrongly worded, additions/replacements shown as purple text + Further elucidation at the edit point.) ~ 5x instance(s).

Spelling Mistakes {"Ehh, Gad!"} - Since I spellcheck before posting, these should be very rare and only occur when the spellchecker does not highlight an error as the misspelling results in a different, legitimate word, and thus is not flagged, but is still incorrect and needs fixing.
................................................. (Fix = Strikethrough applied, new correct word follows. No colour change.) ~ 1x instance(s).

New Smiley(s) inserted {I feel the need... What did I do there, where was my mind focussed to actualy write that?  Don't wish to sound mealy mouthed or demanding, and on further reading I feel that this is how I may have come over, so an appropriate Smiley was required in my original posting.}.
...............................................  (Fix = Inserted appropriate smiley with background colour. Today's Colour IS _ Lime Green, the colour of embarrassment! · ) ~ 1x instance(s).


NB: Yes. I am a full fledged grammar nazi, but my only weapon is my language, so fear not young Jedi, it only SEEMS kinky the first time!
----------
-<30>-
[/list]
Remember, wherever you go... There you are!
-= Sometimes my location is: "YESTERDAY!" =-
« Last Edit: June 29, 2015, 01:56 PM by MikleB, Reason: Please see the dated \"Editing Legend\" above for today\'s reasons. »

Twinbee

  • Member
  • Joined in 2012
  • **
  • Posts: 84
    • View Profile
    • Donate to Member
Re: WildOpal - hypothetical new idea for a "find and replace" program
« Reply #29 on: June 29, 2015, 06:23 AM »
Hi Michael, wow that's a long post!

I've just released version 1.2 which has around half of the ideas you suggested. Let me know what you think, and if there's something you really still need, let me know.

By the way, the main thread is now located here, so perhaps a mod can close this thread now. Feel free to post in the new thread.

Since I created WildGem, I love to use Regex myself now (I use WildGem as a converter from WildGem syntax to Regex, since Regex is trickier to write). I even used Regex for the latest version of WildGem, so in a roundabout way, I'm using WildGem to help create WildGem! ;)
« Last Edit: June 29, 2015, 06:36 AM by Twinbee »

LorinRicker

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1
    • View Profile
    • Donate to Member
Re: WildOpal - hypothetical new idea for a "find and replace" program
« Reply #30 on: September 15, 2015, 08:51 PM »
I think it was OpenVMS Language Sensitive Editor had its own pattern matching scheme.  A percent sign matched any character is the only one I remember.  I wonder if they used regex internally or rolled their own.

The (Open)VMS Language Sensitive Editor (LSE), along with EVE (Extensible VMS Editor) and my own KED (Keypad Editor), all rolled their own pattern matching mini-languages/syntax, as these all were developed well before (or at least in parallel with) regular expression (regexp) syntax became common or even popular. LSE, EVE and KED were each written in a very interesting (alas, proprietary for VMS) text processing language called TPU (unimaginatively, Text Processing Utility).

TPU was (still is) a very powerful, high-level, text manipulation programming language, with data structures and operations to handle unlimited text buffers, arbitrarily-sized display windows, select (and other) regions and ranges, all necessary primitive operations on characters and strings (up/low-case, trims, concatenation, substrings, etc), and a very powerful and general string/pattern matching sub-language (functions).

Developing an application (like a specific text editor) in TPU is much like working with a dynamic interpreted language like Ruby or Python; however, TPU programs (scripts) could be either run via the interpreter, or could be "compiled" into a byte-code like binary file for execution speed. TPU code could "write" or generate TPU code, which it then could directly evaluate, giving the same incredible runtime power that you find in Ruby or Lisp today.

I've not actually done it, but I'm pretty sure that a complete RegExp implementation could be built in TPU. Again, as a tool of its time and its place, the syntax of RegExps hadn't actually occurred to developers then...
« Last Edit: September 15, 2015, 08:58 PM by LorinRicker, Reason: add more information »

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: WildOpal - hypothetical new idea for a "find and replace" program
« Reply #31 on: September 16, 2015, 08:58 AM »
TPU

Very interesting.  Thank you for the info.   :up:

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,169
    • View Profile
    • Donate to Member
Re: WildOpal - hypothetical new idea for a "find and replace" program
« Reply #32 on: September 17, 2015, 04:04 AM »
Hi TwinBee. While I prefer straight regex syntax (not the extra layer of non-regex custom symbols) I gotta say: color coding the non plaintext parts of the syntax makes a big difference. I wish every other GUI in the world that has a regex search and replace option implemented such color coding as a standard.  :Thmbsup:

Twinbee

  • Member
  • Joined in 2012
  • **
  • Posts: 84
    • View Profile
    • Donate to Member
Re: WildOpal - hypothetical new idea for a "find and replace" program
« Reply #33 on: September 17, 2015, 03:45 PM »
Glad you agree about the colour coding. Hope you warm to the syntax over Regex at some point too ;)