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

Hello, could anyone shed a light why this script is not working?

Explorer ,
Dec 26, 2021 Dec 26, 2021

p\{\h[xvxi] +\}

 

I am attempting to search and remove the following texts 

{v1-10} or 

{v2-003} the max number of digits are 2 and 3 with a v preceding. 

 

TOPICS
Scripting
247
Translate
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
Community Expert ,
Dec 26, 2021 Dec 26, 2021

You are not targetting the digits. and you are targetting "one-or-more" spaces *before* the closing brace. Also not sure what the "p" at the start is for. Try this:

 

\{v\d-\d+\}\s

 

- Mark

 

EDIT: the \s targets a trailing space, which is often good to do when removing text, but it might not be right for your case. Also looking at your grep I wonder if the "v" is sometimes "x" or "i"? If so, replace "v" in my grep with "[vxi]" which will match 1 of any of those characters.

Translate
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
Community Expert ,
Dec 27, 2021 Dec 27, 2021

More important than this, what's it like in the future???

Screen Shot 2021-12-27 at 12.28.15 PM.png

Translate
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
Community Expert ,
Dec 27, 2021 Dec 27, 2021

\{\h?v\d{1,2}-\d{1,3}\}\h

Translate
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
Engaged ,
Dec 28, 2021 Dec 28, 2021
LATEST

Hi @noob1212121 ,

 

If you use this pattern in script then you should use double slash instead of single slash.

 

\\{v\\d-\\d{2,3}\\}

 

 If you find using indesign palette then you should use: 

 

\{v\d-\d{2,3}\}

 

-Sumit
Translate
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