I'm brand new to GREP and its uses in InDesign, and while I'd like to understand it in a more robust way someday, at the moment I'm struggling to find some resources that can explain just the basics to me in a comprehensible way.
So, Question #1: If you happen to know of such resources, it would be awesome if you could point me toward some. Keep in mind I am a designer not a coder, so if the resource is riddled with coding jargon like "shell" and "escapes" and "environment variables in the regex" I am not going to have any idea what those words mean. I can generally grasp coding principles pretty well but I don't know the vocab.
Question #2: Can someone tell me how to write a GREP expression that will target any grouping of characters containing a period with letters and/or numbers on either side of it, but no space? I am looking to target URLs, email addresses, and phone numbers, and our house style writes those as the following:
url.com
000.000.0000
What I want to do is make it so that line breaks never happen in the middle of these "words." I know it involves creating a character style with the No Break setting and then using a paragraph style to apply the character style using GREP, but I don't know how to write these parameters in GREP. Targeting anything between spaces that has a period should work but I don't know how to write that.
Question #3: Can we write a second expression targeting social handles and hashtags? So that would be any word starting with a @ or # that may or may not have numbers and/or an underscore in it. If it is followed by any punctuation before the next space aside from an underscore, I would like the punctuation to not be included in the expression. (So , . ! ? — - should not be included in the expression but _ should.) This should probably distinguish social handles from email addresses by specifying that a social handle will always have a space before the @ (whereas an email address would not), but I would prefer the preceding space to not be part of the selection.
Bonus!: I would love, love, love it if these answers could come with explanations for why they work and what they're doing. I'll still love answers that solve my problem and teach me nothing in the process but that's only 1/3 of my available love. Teach a man to fish and all that. :)