Jump to content

Recommended Posts

 

3 hours ago, Bhikkhu Pesala said:

Maybe another submenu could be added where users could store their most frequently used Regular Expressions. The drop list remembers about 20

A drop list of memorized search and replace is fine. It would be fine too if those were some external text or XML files as the ones saved in different folders for different type of search by ID.

This way, it's easy to give  a "list" (some XML files) or replacements for specific works. And it's an easy way to store them away (or in a subfolder) until the next year when we'll need them.
For example I manage to reduce from 1 week to 1 day the formatting of a document with a list of ±35 "search and replace" with text and GREP. (Using script to do them in the proper order is even better). Hiding them in a subfolder is easy, or archiving them with the document would be better!

It's easy too, to give those files with the working document if someone else need it, or when working on another computer.

Another point: you can rename those files when needed, or (dupplicate them and) modify easily the regular expressions. That's faster than doing it again in the application.

Share this post


Link to post
Share on other sites
7 minutes ago, Wosven said:

... (Using script to do them in the proper order is even better). ...

Yep, using GREP within a script makes for a great tool. Some of my scripts are single-purpose tools, as are some of my UltraEdit macros. But others combine GREP within JS or the UE macros.

If such a capability as saved GREP happens, it would be nice for a list such as UE has. They can be named. I don't know how many times I have looked through a GREP list and wondered, now why did I save this expression?

Share this post


Link to post
Share on other sites
2 minutes ago, MikeW said:

[…] GREP list and wondered, now why did I save this expression?

Same here. Or looking at the list with some queries' cryptic name of only 50 characters with abreviations: this rebus looks like a modern SMS!

Scripts are very usefull. Like you, I've got some one-purpose scripts, used with keyboard shortcut if I need them on monthly publications. It can save a lot of time if scripts can reproduce most of the actions we do in the application, and more. An option to save internaly (in the app or the document) some parameters for those scripts — for example last option(s) selected — is important too.

 

Share this post


Link to post
Share on other sites

Well adding some accessable snippets panel for defining, adding and storing/reloading custom regular expressions lists shouldn't be much of a theme here. - Scripting is another theme and much more complex to implement in a well suited manner, though of course this then would offer a bunch of more powerful capabilities and usage scenarios.

Related to the always used term GREP here for regular expressions, it seems that this naming oddity stems somehow from InDesign and thus is more used by InDesign users.


☛ Affinity Designer 1.7.1 ◆ Affinity Photo 1.7.1 ◆ OSX El Capitan

Share this post


Link to post
Share on other sites
2 minutes ago, v_kyr said:

Related to the always used term GREP here for regular expressions, it seems that this naming oddity stems somehow from InDesign and thus is more used by InDesign users.

I think using GREP is more of a brand name being used for the general term, Xerox for Photocopy.


MacBook Pro (13-inch, Mid 2012) Mac OS 10.12.6 || Mac Pro (Late 2013) Mac OS 10.14.5

Affinity Designer 1.7.2 | Affinity Photo 1.7.2 | Affinity Publisher 1.7.2 | Affinity Designer Beta 1.7.2.2 | Affinity Photo Beta 1.7.2.151 | Affinity Publisher Beta 1.7.2.458

Share this post


Link to post
Share on other sites
1 minute ago, Old Bruce said:

I think using GREP is more of a brand name being used for the general term, Xerox for Photocopy.

It's actually a Unix command line utility, used for searching files by regular expressions.

Share this post


Link to post
Share on other sites
1 hour ago, Old Bruce said:

I think using GREP is more of a brand name being used for the general term, Xerox for Photocopy.

Well the usual origin of the name GREP related to Unix and regular expressions is clear, see here ...

... what I always wondered more is that a lot of people here did name such a plain reg exp search/replace feature always GREP. But in the meantime I saw that Adobe InDesign has named it's reg exp searching feature like that and that's probably the reason people (well none programmers/coders and thus more DTP users) here call it that way.


☛ Affinity Designer 1.7.1 ◆ Affinity Photo 1.7.1 ◆ OSX El Capitan

Share this post


Link to post
Share on other sites
On 4/19/2019 at 5:38 PM, v_kyr said:

what I always wondered more is that a lot of people here did name such a plain reg exp search/replace feature always GREP. But in the meantime I saw that Adobe InDesign has named it's reg exp searching feature like that and that's probably the reason people (well none programmers/coders and thus more DTP users) here call it that way.

+1

I use regular expressions in programs and fonctions when scripting and searching documentation, and always used this term until I begin using ID. (It wasn't in QXD when I used it, and I missed it a lot!) It seems logical to use the term GREP related to programs like APub, since few users I know use regular expressions, and the ones that use them know them as GREP from ID.

Share this post


Link to post
Share on other sites
On 4/19/2019 at 6:38 AM, v_kyr said:

...

Related to the always used term GREP here for regular expressions, it seems that this naming oddity stems somehow from InDesign and thus is more used by InDesign users.

 

On 4/19/2019 at 6:42 AM, Old Bruce said:

I think using GREP is more of a brand name being used for the general term, Xerox for Photocopy.

 

41 minutes ago, fde101 said:

we should educate them on more accurate terminology

If I recall, ID uses pcregrep. It uses GREP in the f/r dialog. And GREP is shorter if one want to type it out.

But does it really matter? What, change the name just so it isn't what ID uses? Seems silly to me.

No matter which one of the dozens of GREP flavors one uses, I've seen them all reduced to GREP at one time or another and the only time it matters is when one specifies the flavor of UNIX...which also is just a shortened version that typically encompasses all flavors.

Share this post


Link to post
Share on other sites
1 hour ago, MikeW said:

What, change the name just so it isn't what ID uses?

No, change it because the terminology ID uses is wrong.

Regular Expressions is the correct term.  "grep" is a specific program which happens to use regular expressions.  ID is not grep, and neither is Publisher; each offers an implementation of regular expressions.

 

1 hour ago, MikeW said:

And GREP is shorter if one want to type it out.

The common, more correct abbreviation is "RegEx", which is only one extra character.

 

 

Examples from programs that do it correctly:

 

Atom (text editor):

227050100_ScreenShot2019-04-23at17_36_25.png.cfa34fbe0f1854f2b784f8fd8364e65a.png

 

Nisus Writer Pro:

1827844273_ScreenShot2019-04-23at17_38_20.png.78950665726181ea08143c4a1c93c2df.png

 

 

Share this post


Link to post
Share on other sites

Yes GREP is just one of the many Unix OS related tools which uses and supports regular expressions, AWK, SED, ED, EX, VI(M), Emacs, ... etc. are others. But none of the tools, editors or IDEs I've seen and used ever (and I used a bunch of these over time under all OS) used the term or naming GREP for regular expressions synonymously here so far. Not sure why Adobe used it that way then.

  • Sublime text  regexp_sublime.jpg.64fdb22749b8f4b6d5c81e3af1fd23a9.jpg
  • Emacs
    regexp_emacs.jpg.5229d987a0221c25c3b051deb6a3cbe5.jpg
  • Textmate
    regexp_find.jpg.14fc124483d47ac99aa82b420307fb47.jpg

    regexp_textmate.jpg.cb3a7e0d159f85a6ed5c41356cc07081.jpg

... and so on ...

And yes, "RegEx" or "RegExp" is often used as an abbreviation for the longer designation of regular expression here instead.


☛ Affinity Designer 1.7.1 ◆ Affinity Photo 1.7.1 ◆ OSX El Capitan

Share this post


Link to post
Share on other sites

I use grep in InDesign paragraph styles to apply a character style.

image.png.048c2d6530cf5a45ec3aef720aed4a16.png

image.png.cdc929d34b24b75b558a529e33dfa027.png

So +1 from me to add grep into paragraph text styles.

Share this post


Link to post
Share on other sites
19 hours ago, APEGamer said:

So +1 from me to add grep into paragraph text styles.

i would like the feature, but with a more reasonable name.  Naming this "grep" after an arbitrary unrelated program that just happens to use regular expressions is kind of silly and there is no need to repeat the error of Adobe's ways.

Share this post


Link to post
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

×