Can you please give that example in text?
What do you want to find?
If I have that:
H.Y. Cai, C.H. Wang, P.S. Gao, Y. Sun & L. Guo and Y. Sun and L. Guo, Z.J. -Li, A.C. Xue and T.S. Bi.
… and want this
H.Y. Cai, C.H. Wang, P.S. Gao, Y. Sun, L. Guo, Y. Sun, L. Guo, Z.J. -Li, A.C. Xue and T.S. Bi.
… with Multi-Find/Change, I'll do quickly it in 1 click with 3 regex:
Thanks for your replies.
In my Selection between "comma" , "&", "and" : H.Y. Cai, C.H. Wang, P.S. Gao, Y. Sun & L. Guo and Y. Sun and L. Guo, Z.J. -Li, A.C. Xue and T.S. Bi.
Is it possible to find the text between "comma","&", "and"?
I don't want text replacing . I want to select the text using grep command.
Please help me.
(,|&|and)\K.+?(?=,|&|and) will find all but the text after the last comma, ampersand or "and" as it requires one of those before AND after to make a match. Won't pick up the starting text, either, for the same reason.
Nicely written! …
I don't find a similarly written regex that finds all (beginning and end of paras).
finds all except the first and last occurrence of a story! Annoying!
… But we could always create an illusion as do magicians! [using a little grep find/replace and a non-joiner!]. So:
Could work and find all!
I like that \K operator you introduced to me last week.
For the uninitiated, the \K is not yet documented for ID, but seems to work in CS6 and newer. Essentially it turns what comes before it into a look-behind, so it's a way around the non-variable length requirement of the standard look-behind.
Hi Thanks for your helps.
But this grep does not work (i.e)., cannot select all.
L.D. Gao & R.J. Zhang
L.D. Gao, R.J. Zheng & R.J. Zhang
Rakesh sharma kashinathan
Wenhui Liu, R.J. Zheng & R.J. Zhang
Ting-Feng Cui & Xiang-Ling Tao, ****-Sheng Zhang & Gang-Wei Fan
H.Y. Cai, C.H. Wang, P.S. Gao, Y. Sun, L. Guo, Z.J. Li, A.C. Xue, and T.S. Bi
Yonglan Xu, Dongxiao Niu, Bingyi Liu, Jingpeng Liu, Xiaoyu Wang, and Hao Feng
S.G. Fang and S.B. Wang
Hongmei Gao and Chaomin Liu
Please help me.
… If not, can you use Multi-Find/Change and do it in 1 click (but using 3 regex)?
… If not again, can you simply use Peter's regex modified as:
I think it's an interesting way to select all excluding text parts!
John, at this point I'm not sure what you actually want to do, and I suspect it is select everything EXCEPT comma, ampersand or "and," regardless of where it is in the line.
Can you clarify for us what is is you need to do to this text, and how many different cases you need to match?
I prefer this:
Is this for the purpose of applying a NoBreak command to the found text?