Jump to content
You must now use your email address to sign in [click for more info] ×

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.

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

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

 

Link to comment
Share on other sites

  • 1 month later...

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.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

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

Mac Pro (Late 2013) Mac OS 12.7.4 
Affinity Designer 2.4.1 | Affinity Photo 2.4.1 | Affinity Publisher 2.4.1 | Beta versions as they appear.

I have never mastered color management, period, so I cannot help with that.

Link to comment
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.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

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

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

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

 

 

Link to comment
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.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Link to comment
Share on other sites

  • 2 weeks later...
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.

Link to comment
Share on other sites

  • 1 year later...

I find Regex (also known as GREP) is already available in Affinity Publisher's Find/Replace. Are we talking about something else when we say it's missing. Of course, it is not available as part of Paragraph Styles.

I'd love to see the options to choose GREP commands to input directly into the Find/Replace fields. Right now, you'd need to know what query to put & type it out yourself.

image.png.568650f73e8a1541f954cf23ccd7c5b6.png

Link to comment
Share on other sites

9 hours ago, Ravi. said:

I find Regex (also known as GREP) is already available in Affinity Publisher's Find/Replace. Are we talking about something else when we say it's missing.

This is a very old thread (so old in fact that the last post before yours was before Publisher was released for sale). Regex was one of the things that we asked for during the public beta and Serif implemented before release.

There are still improvements that are needed, but the main purpose of this thread has long been satisfied.

 

Link to comment
Share on other sites

  • 2 months later...
On 12/14/2018 at 5:48 AM, v_kyr said:

global/regular expression/print  [g/re/p] (see the Gnu grep manual, 4 Usage -> QA point 16. for reference )

J'ai dormi depuis. Désolé pour le retard.

*****

I’ve been asleep ever since. I’m sorry I’m late.

 

http://fr32c.free.fr/iDUG/GREP2010-LaurentTournier-iDUG-Paris.pdf

Toujours pas !
Windows 10 Pro 21H2 - Intel Core i7-3630QM CPU @ 2.40GHz - 16 Gb Ram - GeForce GT 650M - Intel HD 4000
Affinity Photo | Affinity Designer | Affinity Publisher | 2

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.