1 00:00:06,800 --> 00:00:13,360 Hi there! In this video you’re going to learn  about GREP Style. Ya, I know, it sounds like a   2 00:00:13,360 --> 00:00:18,960 weird name, but it’s an abbreviation of ‘globally  search for a regular expression and print.’ 3 00:00:19,840 --> 00:00:24,800 It’s a really powerful feature of  InDesign, and particularly for bookmaking,   4 00:00:24,800 --> 00:00:30,560 or for texts, that need to have repeated words  or characters, so let’s learn how to do it. 5 00:00:32,159 --> 00:00:38,800 I already have my paragraph and character styles  panel showing here, so if yours are not showing,   6 00:00:38,800 --> 00:00:44,480 just go to window, and then styles, and you  shall find both of them sitting under it.   7 00:00:45,440 --> 00:00:52,960 The shortcut to show the paragraph styles panel  is Command F11 on a Mac, or Ctrl F11 on a PC,   8 00:00:53,520 --> 00:01:01,120 and for character styles panel is Shift Command  F11 on a Mac, or Shift Ctrl F11 on a PC. 9 00:01:02,000 --> 00:01:07,360 Let’s grab the text tool, and make a large  text box. Right-click, and fill it with   10 00:01:07,360 --> 00:01:14,080 placeholder text. Since our text is all junk  characters, I’d rather add some real words to it.   11 00:01:14,080 --> 00:01:18,880 Let me type in the word ‘automatic.’ I’m  going to repeat the word here as well.   12 00:01:20,160 --> 00:01:23,360 In fact, let’s copy the word,  and paste it, one last time. 13 00:01:24,480 --> 00:01:32,560 Similarly, I’m going to add amounts as well,  so let’s type in $2400, and then select   14 00:01:32,560 --> 00:01:38,960 and copy this. Now I’m going to paste it at any  random location, and change the amount to $800.   15 00:01:41,200 --> 00:01:42,800 Don’t worry, you’ll know, soon enough,   16 00:01:42,800 --> 00:01:48,720 why we’re doing this. Let’s copy it once  more, and change the amount to $2330. 17 00:01:50,240 --> 00:01:55,360 Lastly, I’m going to add another word ‘touching’,  and then I’m going to copy, and paste it here,   18 00:01:56,640 --> 00:02:01,280 and I’d like to have the word in its base  form as well, so let’s type in ‘touch’,   19 00:02:01,280 --> 00:02:08,639 without the ‘ing.’ Perfect! Now the boring  stuff is over, so let’s hit Command A on a Mac,   20 00:02:08,639 --> 00:02:14,240 or Ctrl A on a PC, to select all, and then  click the small plus button at the bottom of   21 00:02:14,240 --> 00:02:19,200 the paragraph styles panel. Double-click  the new paragraph style, and rename it   22 00:02:19,200 --> 00:02:27,680 ‘body text.’ Go to ‘basic character formats’ tab.  Let’s change the font to ‘Arial’, and hit okay.   23 00:02:28,640 --> 00:02:34,000 Our text has a paragraph style now. Let’s  double-click the body text paragraph style,   24 00:02:34,000 --> 00:02:38,160 and on the left column, you should find  the ‘GREP Style’ option, so click it.   25 00:02:39,680 --> 00:02:46,000 Next, hit the ‘New GREP Style’ button. Click  just next to the ‘Apply Style’ option, to reveal   26 00:02:46,000 --> 00:02:51,920 a dropdown menu. At this point, no character  style is showing, because we never made one,   27 00:02:51,920 --> 00:02:55,840 so let’s make one now, by clicking  the ‘New Character Style’ option.   28 00:02:56,640 --> 00:03:02,240 Let’s rename it ‘bold’, cuz I can’t think  of any name, at this point. Go to ‘Basic   29 00:03:02,240 --> 00:03:09,280 Character Formats’ tab, and select ‘Arial’ as  your font, and change the font style to ‘Bold.’   30 00:03:10,160 --> 00:03:16,320 Now go to the ‘Character Color’ tab, and pick  the pink color, and hit okay. Now click next to   31 00:03:16,320 --> 00:03:22,880 the ‘To Text’ option, and remember we typed in the  word ‘automatic.’ Type in ‘automatic’, exactly the   32 00:03:22,880 --> 00:03:28,560 way you typed in earlier, so if it was in capital  letters, you should type it in capital letters   33 00:03:28,560 --> 00:03:34,960 here as well, else GREP won’t work. The moment  your cursor leaves the cell, you’ll find the word   34 00:03:34,960 --> 00:03:39,840 ‘automatic’, getting highlighted, rather taking  effect of the character style you just set for it. 35 00:03:40,800 --> 00:03:47,440 Let’s head to our text, and randomly pick any  location, and add quotation marks. I have added   36 00:03:47,440 --> 00:03:52,720 quotation marks to this phrase here. What I’m  trying to do is, make a new GREP Style, in   37 00:03:52,720 --> 00:03:58,240 which any instance where I add opening and closing  quotation marks, it should inherit the character   38 00:03:58,240 --> 00:04:04,080 style I set. This time let’s make a new character  style, straight from the character styles panel,   39 00:04:04,080 --> 00:04:09,680 by clicking the plus button. Double-click  the new style, and rename it ‘quotation.’   40 00:04:10,560 --> 00:04:15,200 Let’s go to ‘basic character formats’  tab, and change the font to Futura,   41 00:04:16,560 --> 00:04:23,360 and font style to medium italics. Let’s go to  ‘character color’ tab, and change the color to   42 00:04:23,360 --> 00:04:31,840 ‘green’, and hit okay. Let’s go to body text, and  then the GREP style, and add a new grep style. In   43 00:04:31,840 --> 00:04:38,080 the ‘apply style’ option, let’s pick ‘quotation’,  and in the ‘to text’ option, let’s add “.+?”.   44 00:04:47,280 --> 00:04:52,240 The moment you click anywhere outside of the  cell, the character style will take effect,   45 00:04:52,240 --> 00:04:58,960 so hit okay. Now let’s add quotation marks to  see if they work with new instances as well, so   46 00:04:58,960 --> 00:05:05,920 I’m going to add the opening quote, and then the  closing quote, and voila! It works like a charm! 47 00:05:06,880 --> 00:05:12,800 Let’s go to GREP Style once again. Add a new  grep style, and in the ‘apply style’ option,   48 00:05:12,800 --> 00:05:18,560 click ‘new character style’ option. Let’s  rename our new character style, ‘touch.’   49 00:05:19,840 --> 00:05:27,200 Go to ‘basic character formats’ tab and change the  font to ‘Poppins’, and font style to ‘semibold.’   50 00:05:29,600 --> 00:05:33,280 Also, change the character  color to ‘blue’, and hit okay.   51 00:05:34,560 --> 00:05:40,240 Now in the ‘to text’ option, if I type in ‘touch’,  and come out of the cell, you’ll find that,   52 00:05:40,240 --> 00:05:45,840 not just the word ‘touch’, but the word ‘touching’  has also taken effect of this new style,   53 00:05:45,840 --> 00:05:50,800 which we never wanted, so to fix that,  click the cell where you typed in ‘touch.’   54 00:05:51,760 --> 00:05:58,400 Ensure that the word is not highlighted. You shall  find the ‘@‘ sign right next to it. Click it and   55 00:05:58,400 --> 00:06:03,920 it shall reveal a wide variety of options  you can play with. Let’s go to ‘locations’,   56 00:06:04,800 --> 00:06:10,800 and then ‘end of word.’ This tells InDesign  that the word ‘touch’, is the target word,   57 00:06:10,800 --> 00:06:16,320 and it shall not go beyond it. The moment you  select the ‘end of word’ option, you’ll find that   58 00:06:16,320 --> 00:06:21,360 now, just the word ‘touch’, is highlighted,  like we wanted it to be, so let’s hit okay. 59 00:06:22,240 --> 00:06:28,560 Let’s discuss one more feature of GREP, so let’s  get back to GREP style. Click ‘New GREP Style’   60 00:06:28,560 --> 00:06:36,800 option. Under ‘apply style’ option, let’s make  a new character style. Rename it ‘dollar’, and   61 00:06:36,800 --> 00:06:42,960 then go to ‘Basic Character Formats’ option. From  here, change the font to ‘Museo Sans Condensed’,   62 00:06:43,680 --> 00:06:50,720 and font style to ‘700.’ Move on to ‘Character  Color’ tab, and select red as your color,   63 00:06:50,720 --> 00:06:58,240 and hit okay. In the ‘to text’ option, if  you enter $2400, you’ll find that it is not   64 00:06:58,240 --> 00:07:04,800 highlighting the amount in the text. It’s because  the ‘$’ in itself is a special character of GREP,   65 00:07:05,600 --> 00:07:13,440 so it won’t work here. What you need to do is, add  a ‘\’ before $2400, but does it solve our problem?   66 00:07:14,320 --> 00:07:21,360 I can see that only $2400, is highlighted, but  $800 hasn’t picked the character style yet.   67 00:07:22,000 --> 00:07:29,360 What we need to do is delete the digits, and  let’s just have ‘\$’, and then click the ‘@‘   68 00:07:29,360 --> 00:07:37,440 sign on the right, and go to ‘wildcards’, and then  ‘any digit.’ You’ll see that this action has added   69 00:07:37,440 --> 00:07:45,200 another ‘\’ and a ‘d’ to our recipe, but has it  solved our problem? I don’t think so, because now,   70 00:07:45,200 --> 00:07:49,840 I could see just the ‘$’ sign and the first  digit after it, getting highlighted, which means,   71 00:07:49,840 --> 00:07:55,840 we still need to do something more. Click the  ‘to text’ option once again, and then click the   72 00:07:55,840 --> 00:08:03,920 ‘@‘ sign, and go to ‘repeat’, and under ‘repeat’,  select ‘one or more times’, and you shall find,   73 00:08:03,920 --> 00:08:10,560 it has added a ‘+’ sign to our equation now. This  time, our job is done, as we expected it to be,   74 00:08:10,560 --> 00:08:17,680 so hit okay. I think we added another amount  somewhere, here it is! You’ll find a cheatsheet of   75 00:08:17,680 --> 00:08:24,080 major GREP styles in the exercise files, so do try  some of them. Since GREP uses codes to describe a   76 00:08:24,080 --> 00:08:29,040 text pattern, it’s not possible to remember  all of them, and you don’t need to as well,   77 00:08:29,040 --> 00:08:33,679 but do make good use of them, and I’m sure  you’ll love them. I’ll be covering a few   78 00:08:33,679 --> 00:08:40,000 topics based on GREP in the upcoming unit as  well to ensure that you fall in love with it. 79 00:08:40,000 --> 00:08:43,760 Alright guys, that concludes our  session, grep a cup of coffee.   80 00:08:44,320 --> 00:08:52,960 Oh sorry, grab a cup of coffee, and  I shall see you in the next one.