在indesign中GREP可以帮助打破界限
示例:(下面是格式我希望grep帮我打破免费赠品和平等线)可能吗?
You and your guest are invited to enjoy one complimentary
MAIN COURSE when a MAIN COURSE
of equal or greater value is purchased.
答案 0 :(得分:0)
如果我理解你的问题,你有一个长行如下:
You and your guest are invited to enjoy one complimentary MAIN COURSE when a MAIN COURSE of equal or greater value is purchased.
您希望将这条长行分成以下三行:
You and your guest are invited to enjoy one complimentary
MAIN COURSE when a MAIN COURSE
of equal or greater value is purchased.
然后sed
就是你想要的,而不是grep
:
sed -e 's/COURSE\sof/COURSE\nof/' -e 's/complimentary\s/complimentary\n/'
用法:
sed -e ... -e ... <<<"Your long line"
或
echo "Your long line" | sed -e ... -e ...
其中 ...
是上面的表达式1和2(例如's/COURSE\sof/COURSE\nof/'
)