Copy link to clipboard
Copied
I'm trying to change 01, 02, 03, up to 09 and change to the digit without the 0 (zero).
Thanks in advance,
Geoff
Copy link to clipboard
Copied
I don't understand. Specifically...? Thank you to give us samples?
Copy link to clipboard
Copied
Sorry, yes, I have class information that has dates, times and hours. I want to change May 04 to May 4, May 07 to May 7 and so on. Just need to delete the zero in the dates while keeping the zero's in times, e.g. 10:30 p.m.
Copy link to clipboard
Copied
So:
Search: (January|February|March|April|May|June|July|August|September|October|November|December)(\s0)
Replace: $1~S
Copy link to clipboard
Copied
Thank you Obi-wan.
Copy link to clipboard
Copied
I understand the search, can you explain what $1~S is saying?
Copy link to clipboard
Copied
Hi,
When we make a regex (grep search/replace), we often use code between (). Grep calls this "sous-expression marquante" (in french). If we write two "sous-expressions marquantes" as: (January)(\s0), in the replace input box, $1 reproduce "January", the first instance between (), (any space + zero) can be reproduced by $2. So if I finally choose "$1~S, that means: I replace (January) by: January (the () are forgotten) and ~S is the grep syntax of an nonbreaking space. (\s0), so (any space + zero), is not taken into account and finally non treated.
So, if I search: "January 0", when I find it, I replace it by: "January " (here, the space is a nonbreaking space (better for what you want!).
I suggest you to read all what you can find on Grep. With JavaScript and imagination, you have the 3 more important tools to work fine!
Copy link to clipboard
Copied
ok, yes, thanks again, that's what I thought, just wanted to be sure I it understood correctly.
Copy link to clipboard
Copied
@GeofferyH use the following expression:
Find: (0{1})([1,2,3,9])
change: $2
Find more inspiration, events, and resources on the new Adobe Community
Explore Now