• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Easy Catalog regex

New Here ,
Jan 12, 2017 Jan 12, 2017

Copy link to clipboard

Copied

I have a table with data in it. There is a column "prices" some data is 0 and I want to replace it with - But i also have 0,25 and that has to stay like it is.

So:

0 -> -
0,25 -> 0,25
01 -> 01
000001 -> 000001

I want to replace the single character 0 to - .

What I tried:

REGEX:^^0=-;

This code replaces the first 0 of all the strings so:

0 -> -

0,25 -> -,25 (BUT I want this to stay)

Any ideas?

Views

938

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Mentor , Jan 12, 2017 Jan 12, 2017

In tables, try search for ^0$.

Will work for cells, which contain 0 character only.

Not useful for regular text list, though.

Votes

Translate

Translate
Advisor ,
Jan 12, 2017 Jan 12, 2017

Copy link to clipboard

Copied

Well if this is for InDesign purposes surely you should just use a GREP styling to dictate this?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 12, 2017 Jan 12, 2017

Copy link to clipboard

Copied

any idea how I can do this? I have no experience with GREP

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Jan 12, 2017 Jan 12, 2017

Copy link to clipboard

Copied

This article may provide some hints even though the goal was to do with phone numbers:  Formatting phone numbers with GREP​.

I'm also still learning about GREP but I would recommend asking https://forums.adobe.com/people/Obi-wan%20Kenobi (Obi-wan Kenobi) to help you more.

If I figure out how to do it in the mean time I will let you know.

Sorry

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Jan 12, 2017 Jan 12, 2017

Copy link to clipboard

Copied

In tables, try search for ^0$.

Will work for cells, which contain 0 character only.

Not useful for regular text list, though.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 12, 2017 Jan 12, 2017

Copy link to clipboard

Copied

it worked in indesign tho. Any idea if I can use this in my tables in EasyCatalog?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Jan 12, 2017 Jan 12, 2017

Copy link to clipboard

Copied

Frankly, I don't use this plugin, and I'm not sure if you can (are allowed to) edit the code somehow...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 12, 2017 Jan 12, 2017

Copy link to clipboard

Copied

found it THANKKSSS : REGEX:^0$; in easyCatalog! Thank you all

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Jan 12, 2017 Jan 12, 2017

Copy link to clipboard

Copied

LATEST

Oh, I'm glad you've sorted it out

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Jan 12, 2017 Jan 12, 2017

Copy link to clipboard

Copied

http://indesignsecrets.com/findbetween-a-useful-grep-string.php

It seems like Find/Replace option would be the starting point

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines