Skip to main content
banl_05
Inspiring
July 3, 2014
Answered

Find the arithmetic operator

  • July 3, 2014
  • 2 replies
  • 436 views

Hi,

My Document lot of mathematical equations. So i have applied the character style arithmetic operators but can't find the "+"

app.findGrepPreferences.findWhat = "+";

And also i tried this method i got that result("−") but i cant find the ("+")

var test = String.fromCharCode(8722);

app.findGrepPreferences.findWhat = test ;

Any one help me

Regards,

Balaji B.

This topic has been closed for replies.
Correct answer Ronald63

Try this ...

app.findGrepPreferences.findWhat = "\\+";

2 replies

Ronald63Correct answer
Legend
July 3, 2014

Try this ...

app.findGrepPreferences.findWhat = "\\+";

banl_05
banl_05Author
Inspiring
July 5, 2014

Hi Ronald63 & [Ariel],

Thanks its now working.

Regards,

Balaji B.

TᴀW
Legend
July 3, 2014

Simplest is instead of using

findGrepPreferences.findWhat

use

findTextPreferences.findWhat

The point is that + is a GREP symbol (meaning one or more times).

So if you really must use GREP, you have to escape it with a backslash

(and that backslash has to be escaped as well if you're scripting it):

findGrepPreferences.findWhat = "\\+";

But again, just use textPreferences unless you have to use the extra

power of GREP

id-extras.com | InDesign tools & scripts for typesetters, form designers, and translators