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

Struggling with regex in Layer Name Editor

Community Beginner ,
Jun 05, 2022 Jun 05, 2022

Copy link to clipboard

Copied

[^_]*$
Using the above expression to select the characters after "_"
but if the layer name has two more "_" then only the characters after the latest "_" will be selected

I tried another expression (?<=_).* but it doesn't work

 

Help~~~

TOPICS
Actions and scripting , Windows

Views

116

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
Adobe
Community Expert ,
Jun 05, 2022 Jun 05, 2022

Copy link to clipboard

Copied

Which script? Can you point to the code?

 

Can you show an example of the layers panel?

 

Is the string something like:

 

_layer name
__layer name

___layer name

 

Edit: Edit is it something like this animation?

 

layer-name-edit-animation.gif

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
Community Beginner ,
Jun 05, 2022 Jun 05, 2022

Copy link to clipboard

Copied

I find out the problem is  Lookahead not being supported
(?<=_).*

 

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
Community Beginner ,
Jun 05, 2022 Jun 05, 2022

Copy link to clipboard

Copied

keungoffice24362655u5zi_0-1654490150720.png

The layer panel is here

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
Community Expert ,
Jun 05, 2022 Jun 05, 2022

Copy link to clipboard

Copied

Thanks, it is still not clear what script or panel or code is being used?

 

A before and after rename would also be helpful.

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
Community Beginner ,
Jun 05, 2022 Jun 05, 2022

Copy link to clipboard

Copied

LATEST

I use this one (?=_)(.*) instead of  (?<=_).*, then it works

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