[CS3] GREP question

I use the following code to find all compound words:

(\w\w+)-(\w\w+)

However, if the first word has initials, such as the "U.S.-China", it does not find it.

So I change the code to be:

(\w(.?) \w+.?) -(\w\w+)

This method works. GREP is now any compound word if there are initials but when there is no initials, she also selects the last letter of the word from the speaker before. For example, what is in parentheses here is selected:

e [e mid September]

Why is that happening and how can I solve this problem?

Thank you

Tom

It seems to work because the only period is a wildcard character 'any character'. So, it is the period in your 'US', but in addition it also matches any character, including a previous space, as you saw.

Use \. to escape from the ordinary meaning of the period and change his behavior as the code of her litera.

Tags: InDesign

Similar Questions

  • Style InDesign Grep question

    Hello

    I have a question about Indesign. I want to make the text a certain character as a space of hair for example "BOLD". This must be addressed in a paragraph style. I think that this can be done with GREP styles. I've tried several things, but it is not supposed me... Anyone know if this is possible or is there a better way to do?

    Thank you!

    Apply style to "bold" to the text:

    (?<>

  • Simple GREP question

    the following case modifier applies to all the text in brackets?

    (\((?i) (all this text is modified\ is?)------)

    I was wondering how editors work with sub-expressions.

    A very good Question!

    -Yes, it does. The modifiers are fully aware of grouping, and so you can do something like

    ( ? i) Hello ((?-i) World) out there

    to find 'Hello' and 'out there' sensitive case-sensitive and case-insensitive 'world'.

    Modifiers should not be at the beginning of your GREP:

    Hello (? i) World (?-i) etc.

    find "Hello" case sensitive (by default), 'everybody' insensitive to the case and "etc (any character)" case-sensitive. This is equal to

    Hello everyone ((?i)) etc.

    Moreover, another method is to use this notation:

    Hello (? i: world) etc.

    which is a little more readable.

  • Premiere Pro CS3 - Preset &amp; Questions for media files

    Volunteered to create a high school highlight video using Premiere Pro CS3 on Mac football games.  The video will appear in a banquet hall with a NEC projector mounted on the ceiling.  The owner of the room has no info on the projector, so I do not know its resolution native or any other specifications.  The screen is full-size.

    I was given a potpourri of media:

    (1) DVD game of the team from the press box.  MPEG Streamclip shows the VOBs have these properties: 720 × 480, 4:3, 29.97 FPS, Mbit/s 9,30, upper field first - 128 AC3 2/0, 48 kHz, 256 Kbps.  Good or bad, I converted the files to import dv VOBs in PP with these properties: DV/DVCPRO - NTSC, 720 × 480, 4:3, 29.97 FPS, Mbit/s 28,77 - stereo 48 kHz, 28,77 Mbps DV.

    (2) field-level video taken with a Canon HV30 (HD, widescreen).  The files I received are: Apple Intermediate Codec, 960 × 540, 29.97 FPS, 30,09 Mbps - 16 bit Big Endian stereo, 48 kHz, 1.54 Mbps.  I could ask to have these repeated files in the form of SD files.

    (3) many line pictures (TIFF) taken with a Canon 30 d-side.

    After the installation of the project, I was counting on the final export of the video/audio as a mov file to be played from my hard drive top round instead of a DVD.  Not sure about the export settings for optimal quality.

    But first, what predefined PP should I use for this project, or should I use the custom settings?  If so, what would they be?

    I converted the VOBs in the correct format?

    Should I resume the HV30 images or convert it to another format?

    I have photos in Lightroom and can export to TIFF, JPEG, PSD or DNG and can resize down if necessary.  Any suggestions?

    Finally, I thought of the conversion of the background music of mp3s to aif files at 48 kHz, 16-bit to be consistent across different audio files.  Any suggestions with the audio?

    Any ideas or suggestions on these issues would be most appreciated.  If the answers to these questions depend on the type of projector, I have perhaps to wing it... or buy my own projector.  Ouch.

    Sorry for the length of this post.

    I recommend that you configure a 720 x 480 4:3 project.  At the very least, have

    recapture them #2 as widescreen SD video files (I will refrain

    to comment on the usefulness of the AIC to half-HD) the

    recovered files widescreen SD eventually letterboxes in your 4:3

    timeline.  Your other choice would be to implement a 720 x 480 16:9 project,

    but who would eventually pillarboxed 4:3 image.  Your choice.

    I think you did a great job converting the VOBs.

    Resize images in Photoshop.  Get closer to 720 x 480 like you

    can adjustment upward to take account of any panning and zoom that

    You can do.  But do not increase the size more than you

    Duty.  You definitely want to avoid working with the huge frame size

    PR images.

    16-bit stereo audio for the 48 k should work just fine.

    You should find out the native resolution of the projector and if

    or not, it has an internal scaler.

    -Jeff

  • Adobe CS3 Activation question

    I used Photoshop CS3 since 2007 without problem, and yesterday I received a message "your computer Setup seems to have changed...". "and says I need to activate it. If I press OK, and then click Next, I see the message "Activate later" or try to call, but of course there is no option of phone to this old version.

    Other programs (such as Adobe InDesign) are still working, so the problem is just with Photoshop.

    I wouldn't change a thing with my computer (Vista), and this message appeared the day after, out of nowhere I tried a restore of the system for April 22, but that did not work. If I uninstall and reinstall. Also has anyone seen this problem? Help!

    Hi janicew,

    Please see the advanced solutions to errors in connection with Adobe Creative Cloud and Creative Suite applications and make sure that Activation is not blocked by the proxy, firewall, or Antivirus.

    Kind regards

    Assani

  • Find and replace grep Question.

    I'll put up paragraph styles and I'm changing anything with < CR > in a ^ p.  How do I do this with a string of grep?  I am wanting to add this string grep grep style in the paragraph styles.

    With GREP Styles you can not change the text, but the formatting of the text.
    You will need an action of find/replace with the TEXT or GREP find/replace.

    Uwe

  • Grep question

    Hello

    In Grep, we'll find "one or more times", but we'll find ranges [for example (\d{3-5)}]

    Kind regards

    MuraliVetha

    You must use (\d{3,5)} instead, between the minimum and maximum number of find with a comma instead of a hyphen.

  • GREP question - space before am &amp; pm

    Hello

    I wonder if there is a GREP which will find a number with an am or pm and add a space between the number between the am or pm?

    Compose my contributors to the magazine that I keep typing time as "19:00", for example, our style says there should be "19:00". This change by hand is a pain.

    Thank you!!!

    To find

    (\d+) (am: pm)

    Implement

    $1 $2

  • Grep Question Placement. ?

    Hi all

    I would like to make the InDesign grep search and replace method to reach below substitutes.

    The requirement is the third line of the text he had move on the first line with carriage return, is it possible instead of Grep.

    Note: I placed is the content for the sample, but live a dynamic content.

    I tried myself with the peace of code here.

    app.findGrepPreferences = app.changeGrepPreferences = null;

    app.findChangeGrepOptions.includeFootnotes = false;

    app.findChangeGrepOptions.includeHiddenLayers = false;

    app.findChangeGrepOptions.includeLockedLayersForFind = false;

    app.findChangeGrepOptions.includeLockedStoriesForFind = false;

    app.findChangeGrepOptions.includeMasterPages = false;

    app.findGrepPreferences.findWhat = "Blabla (\\d+.\\d+)\\r(*.). \\r|| blah-blah-blah. \\r";

    app.findGrep ();

    Thanks in advance.  Any suggestion to find the exact model by using Grep expression.

    Kind regards

    Imagine

    Imagine them salvation.

    Please find below snapshot is easy to understand for you.

    app.findGrepPreferences.findWhat = "^(BLABLA \d+.\d+\r)(.+\r)(\|\|bla-bla-bla\|\|\r)";
    

    THX

    csm_phil.

  • An another GREP Question

    I am trying to use GREP to search for all rows that contain the following text: ""or the words "": then change to: ""or the words ": "

    The problem does not change, it is to find.  I use this string to try to find these words or phrases in brackets with the column at the end: ("") (\w+)(") (:)

    So far, it works very well to find what I want, with one exception.  He is unable to find all the words in parentheses, with what it can't find cases many sing the words.  As far as I understand (\w) should find "any word", but in this line, there is a + which means one or several times, yet he is only not one or more.  Could someone please help me understand why this does not how it appears to work?

    It does not work because several words have spaces between them, and you're not allowing for this.

    I suspect that what you really want to find is (".") + ? (''): although I have not tested. Which should match the shorter what whether in quotation marks and followed by a colon.

  • GREP question: How do \r and \z play at the same time?

    InDesign CS5

    I have a couple of styles GREP designed to allow development of large portions of the text much easier. In order to reduce the time back on and force things back, I created an unbreakable character style to be applied to the words at the end of a paragraph and after punctuation. To get rid of the massive gaps at the end of the lines, I have limited the number of characters in words and whenenver, some still get through, I apply a character style "Delete everything" separate. This makes it easier for our web service during the file conversion, the lack of forced returns and the addition of seamless formatting instead.

    So far, I have 3 GREP queries to apply:

    -\s\ < \w{1,7}\ > < \w{1,8}\ > [.!,:;] »] \r

    -\s\ < \w{1,7}\ > < \w{1,8}\ > [.!,:;] »] \z

    (? < =[.!?;:,"]\s)\ < \w{1,7}\ > \s\ < \w{1,7}\ >)

    The reason for the 3 is the end of the paragraph (\r) query does not apply at the end of a story (\z). I tried to combine the two using ' | ' between queries but it just ends up by doesn't work do not at all. Or with the ends as follows: (\r|\z)

    Is it possible to get this consolidated to a better query, so I need to copy and paste the three whenever I want to apply it to a style? It would be easier when you give the query to people, too, if she were consolidated. All the 3 together would be ideal.

    Thanks to anyone who can lend a hand.

    Use $ instead of \r or \Z

  • Of find/change GREP question

    Salvation of the Italy,

    I need to find each "2" in the words "CO2" and apply (only on the ' 2') index style.

    I can't figure out how. If I search all the 2 at the end of a word I also find 2002 and O2, if I find (CO) (2) and replace it with $12 style index applies to the "CO2" not only "2"...

    Can anyone help?

    Luca

    It's a classic: this forum for the shows "CO2 GREP" search this particular application is a good example of Advanced GREP trickery.

    Short version: you want to search for it:

    (?<>

    Read http://forums.adobe.com/message/1285612#1285612 for the long version.

  • Research GREP question

    Hello all, I generally consider myself as quite convenient to the GREP, but this one I'm not sure. What I need is to be able to search for parts of a text and put them in a paragraph style, and then use more searches to narrow down these results.

    The text is composed of much documents and possibly in the sections an appendix and even a pregnant. each of them are separated by a point size and then a similar version of the same paragraph styles that exist in the text. in any case, what I need is to be able to clear any number of introductory research reaches the signifier of text indicating the section subordinated. Here is the idea for the annexes:

    (? < = ^ APPENDIX ~ b) (. + ~ b) +(?=^DOCUMENT)

    It works in both circumstances in the book however I think the culprit for breaking this research is the forced return and possible nonbreaking spaces. anyone knows how I can put in some type of if theres a return force ignore too type of situation.

    Thank you!

    Try changing the middle section to

    (.*~b)+

    I tried and I tried and it doesn't work... because I had a blank line in my text, which is not what your matches (one or more characters before the back...).

  • CS4 GREP question (something lookaround)

    Hello

    I've been combing internet for a good half hour to try to find a solution to this, but nothing helped.

    The problem: I want to find all the text from the beginning of a paragraph to the 2nd tab.

    So using a real example, I want to what follows, in blue, are:

    < Tab > Q1 one) < tab >text...

    Note: it does not really matter if the second tab is found or not, because this GREP will be used to apply a character style "BOLD".

    I am currently using this lookaround:

    (?<=^).+(?=\t)

    Which works very well if there are only two tabs. But as you would expect, as soon as another tab is inserted all the text up to the 'new' tab is located.

    I can't work out how to sort, so any help would be much appreciated!

    See you soon

    This seems to work:

    ^.*?\t.*?\t

    Peter

  • PS CS3 extended question "load files into stack.

    Hello

    I tried to use the script "Load files in the stack" PS CS3 extended but the problem is that if for example I have files with these names:

    Fichier_1

    Fichier_2

    File_3

    When I use the script he puts together but in the disorder so in my diapers, they are like this:

    Fichier_1

    Fichier_2

    File_3

    that would be a mistake because the fichier_1 is my first image, but it's the last layer so if I do this in a gif file and look at him, he would play back.

    I was wondering if it is far from solving this problem. Thanks in advance.

    PS: If there is anything that I need to provide to make it easier for you to help me, please ask.

    After that the files have been loaded in Photoshop, open the layers palette, select all layers, then layer - organize - reverse.

Maybe you are looking for

  • Satellite M300 - driver downloaded, the files are corrupted

    Hi all I have a Satellite M300 when working there, I bought in Asia. HARD drive died and had to be replaced with the nightmare of normal to find drivers, the main problem being the only site that recognizes the model number - PSMD4L Toshiba Asia. Unf

  • Windows Live Sign in Assist

    Hello I just downloaded the latest beta of Internet Explorer and wanted to give your comments, however he needed me to go to a specific page and download an update of certain. I wonder why this (update) was not available through Windows Update instea

  • Camera Basler ace not yet implemented?

    Hey guys! I use the new Basler Ace acA1300-30gc. I have installed the latest device drivers and Vision Builder 2009 (I have them on a seminar OR a week ago). When I opened the pylon Viewer camera works fine, but when I try to run the program in the E

  • Pavilion dm4 - 1063cl, corrupt Bios, interrupted Bios Update.

    Help, please. Recently, I had bought a second hand Pavilion dm4 - 1063cl with 4 gigs ram and installed with Windows 7 Ultimate edition. Windows 7 installation was completed just before my purchase because the seller wanted to wipe the HD before the s

  • New Tablet IPad pour Lightrom and Photoshop software

    HelloSera you it is possible to use the new Tablet IPad pro with son color to make corrections on an iMac of table as a Wacom tablet pour Lightrom and Photoshop software?Thank you for the answer.Michel