Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


GREP problem when using metacharacter "~K"

New Here ,
Jun 09, 2021 Jun 09, 2021

Copy link to clipboard

Copied

Hi, 

 

What I'm trying to do with GREP is to match only the last two Chinese characters (or Kanji according to the official doc) in paragraphs, regardless of punctuation marks and alnums.

 

Here's the expression I've tested:

    ~K[[:punct:]]*~K[[:punct:]]*$

 

This didn't work. However, when I replace "~K" with "\w" , it works, which means alnums are matched.  

 

Is there something special about "~K"? Or is there a way for my need?

 

Thanks,

Yuwen

TOPICS
How to

Views

66

Likes

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
no replies

Have something to add?

Join the conversation