Need help with GREP expressions

I know - KNOW - there is a way to do it, but keep my GREP expressions.

I want to add an em dash before any sentence that is in a paragraph style. So I obviously want the em dash to be in the 'start of the paragraph' location. Lack of keep all my GREP searches. Can anyone help?

Adobe of the 'start of the subsection' implementation is just a little off the coast of standard GREP (which, in itself, is less a set of hard and fast rules but rather as "guidelines"). Yes - you can Search for beginning of paragraph using plain ^, but you cannot use it with a replace operation.

The trick is to give something to look for in InDesign. Search

^.

(it's just - a wildcard just after the start of a paragraph). You don't want to lose the character it finds, so replace it with

~_$0

where the first 2 codes is your dash and the last 2 is 'the text together. This is your original found generic character!

Don't forget to put your paragraph style in the box of formatting to find.

Of workaround works around the failure of implementation, because indeed, you want to add something to an existing text. Unfortunately, another pretty standard GREP to search for empty paragraphs-^ $-does not work, because then you have no room for a wildcard... (and Yes, you pouvez use a hard return instead of code \r is first or last, but then it will not work at the beginning or at the end of the story). It's one of those things that I wish to see corrected with CS5.

[Edit] HA! Peter beat me to it, but he has made a typo. In addition, my story is longer.

Tags: InDesign

Similar Questions

  • have dell dimension 4700 xp need help with outlook express I have error message and can not send email

    I need help to figure out why my outlook express does not work when I try to send a link, or email. I have a dell dimension 4700 xp restored. The error message cannot find the server with an error code number. I am a newbee so one who responds to it will have to break it down for me. So far, I had lots of help from proceeding to audio and graphics, and I am totally grateful for the help I get.

    Thank you, Gina Davis

    I have

    He has already worked with Outlook Express? Using OE? Hotmail is a Webmail service.

    How to add your Hotmail e-mail account to Microsoft Outlook Express
    http://windowslivehelp.com/solution.aspx?SolutionID=99d4b13d-13dB-40D8-9cdf-172002d4194c

    If you don't want to use OE to access Hotmail and want to just use IE to access Hotmail, then just copy the link and paste it into a new message from Hotmail.

  • Need help with regular expressions

    Hi all

    I need your help, because I have no ideas more...

    I have the following problem: in the column of the database table, I have the string with the names of files already uploaded to the database. For example: + File1_V01.txt +, + File1_v02.txt +, + File1_01_v01.txt +, etc. The string _vxx * + or _Vxx * + (non-case sensitive) represents the version of the file.

    Now the problem: I'll upload the file with the name + File1_v02.txt + (already exists in the table).
    If the file name already exists in the table the pl/sql function should get the name of the file with the following version number. In my case it takes + File1_v03.txt +.

    Is it possible to do this using SELECT with regular expressions?

    Best regards and thanks!
    with t as (
      select 'File_V05.txt' fn from dual union all
      select 'File_V04.txt' fn from dual union all
      select 'File2_v03.doc' fn from dual union all
      select 'File2_v115.doc' fn from dual union all
      select 'File2_v15.doc' fn from dual union all
      select 'File1_v03.doc' fn from dual union all
      select 'File1_v115.doc' fn from dual union all
      select 'File1_v999.doc' fn from dual union all
      select 'File2.doc' fn from dual union all
      select 'File2_v05.doc' fn from dual union all
      select 'File1_v01.txt' fn from dual union all
      select 'File1_v02.txt' fn from dual union all
      select 'File1_v1.txt' fn from dual union all
      select 'File1_v1.doc' fn from dual union all
      select 'File1_v2.txt' fn from dual union all
      select 'File2_v01.doc' fn from dual union all
      select 'File2_v02.doc' fn from dual union all
      select 'File1_ABC_v01_DEF.docx' fn from dual union all
      select 'File1_ABC_V02_ABC.docx' fn from dual union all
      select 'File1_ABC_v01_12_04_17.docx' fn from dual union all
      select 'ABC_V1_QWERT.pdf' fn from dual
    )
    
    select fn,
    case when fn!=fn_new then
     last_value(fn_new)
     over(partition by regexp_replace(upper(fn),'V[[:digit:]]+','') --(.*?V0*)([1-9]+)(\..*?)$
     order by nv
     rows between unbounded preceding and unbounded following
     )
    else fn
    end fn_new
    from (
        select
        case when v-1 <= 0 then fn
        else
               regexp_replace (fn,
                        '(_v|_V)(\d*)',
                        case
                        when length(substr(fn,v+1,p-v-1)+1) > (p-v-1)
                        then '\1'||to_char(substr(fn,v+1,p-v-1)+1)
                        else '\1'||lpad(substr(fn,v+1,p-v-1)+1,p- v-1,0)
                        end
               )
        end fn_new
        ,fn
        ,case when v-1 <= 0 then -1
         else
            substr(fn,v+1,p- v-1)+1
         end nv
        from (
            select fn, regexp_instr(upper(fn),'_V[[:digit:]]+',1,1,1) p, instr(upper(fn),'_V')+1 v from t
        )
    )
    order by fn
    
    FN     FN_NEW
    ABC_V1_QWERT.pdf     ABC_V2_QWERT.pdf
    File_V04.txt     File_V06.txt
    File_V05.txt     File_V06.txt
    File1_ABC_v01_DEF.docx     File1_ABC_v02_DEF.docx
    File1_ABC_v01_12_04_17.docx     File1_ABC_v02_12_04_17.docx
    File1_ABC_V02_ABC.docx     File1_ABC_V03_ABC.docx
    File1_v01.txt     File1_v3.txt
    File1_v02.txt     File1_v3.txt
    File1_v03.doc     File1_v1000.doc
    File1_v1.doc     File1_v1000.doc
    File1_v1.txt     File1_v3.txt
    File1_v115.doc     File1_v1000.doc
    File1_v2.txt     File1_v3.txt
    File1_v999.doc     File1_v1000.doc
    File2.doc     File2.doc
    File2_v01.doc     File2_v116.doc
    File2_v02.doc     File2_v116.doc
    File2_v03.doc     File2_v116.doc
    File2_v05.doc     File2_v116.doc
    File2_v115.doc     File2_v116.doc
    File2_v15.doc     File2_v116.doc
    
  • Need help with regular Expression (RegEx)

    Try to wrap your head around a regular Expression for the following format example: 0022-C-4452 OR 0022-C-4452-C


    * The 4 digits are always numbers

    * The last 5 digits are alpha numeric

    * Last (if used) digit is always 'C' (in reference to the second structure)

    Hold the dashes for "auto fill" if possible? This would be in the Custom Format? Sequence of keys? Or Validation? I appreciate any help!

    I still think that you did not correctly describe your problem.

    1 figures of 4 characters.

    Optional separator.

    Then 6 alphanumeric characters and ' - '.

    OR

    1 figures of 4 characters.

    Optional separator.

    Then 6 alphanumeric characters and ' - '.

    Optional separator.

    Character 'C '.

    Note that the "-" is not a number and not an alphabetic character. It is a white space character.

    Try:

    function {MyRe (cString)
    var cFormatted = "";
    var RE_MyCode0 = /^(\d{4})[-.]) {0,1} ([A-Za-a0 - 9-] {6}) $/;
    var RE_MyCode1 = /^(\d{4})[-.]) {0,1} ([A-Za-a0 - 9-] {6}) [-.] {0,1} ([C]) $/;
    If (RE_MyCode0.test (CString) == true) {}
    cFormatted = RegExp. $1 + '-' + RegExp. $2;
    }
    If (RE_MyCode1.test (CString) == true) {}
    cFormatted = RegExp. $1 + '-' + RegExp. $2 + '-' + RegExp. $3;
    }
    Return cFormatted;
    } / / end of MyRe function;

    some tests;
    var MyString = "0022-C-4452; good channel;
    Console.println ("Input:" + MyString);
    Console.println ("result:" + MyRe (MyString));

    var MyString = "0022-C-4452-C; string of Goo;
    Console.println ("Input:" + MyString);
    Console.println ("result:" + MyRe (MyString));

    var MyString = "A022-C-4452" / / bad string;
    Console.println ("Input:" + MyString);
    Console.println ("result:" + MyRe (MyString));

    var MyString = '0022-4452-CZ' / / bad string;
    Console.println ("Input:" + MyString);
    Console.println ("result:" + MyRe (MyString));

  • Need help with GREP query-extract

    Hi people,

    I'm trying to harden a GREP query, I have reconstitute.

    This discovery channel allows me to search for text in the < ex > tags and remove the tags themselves. We then apply the Exchange my extract paragraph style field.

    ( ? s). (< ex > *) (.+?) (* < /ex >)

    What I need to do is add a blank line above and below the excerpt. In addition to the string?

    TIA

    Yes, by changing to \r$2\r

    BUT this text is already a paragraph? If this is the case, it would be preferable to add a space before and after as part of the style. If this isn't the case, I'm not sure that adding the returns in the same operation will not change the text from which it is extracted, then you want to find all first . +? change \r$0\r without change the formatting and then run that you now have to change the format on the excerpt.

  • Brochure... need help with GREP

    Hello people.

    I'm working on a brochure in InDesign (CS4). It is a brochure of jewelry with wholesale prices (W) and the suggested retail price (SRP).

    Unfortunately they have been entered backwards, through the entire document, then all wholesale prices appear suggested retail price and vice versa.

    Is there a way to use GREP to crawl through the document and return the price? I've attached a screenshot of the price line. The "BOLD" is a character style.

    Thanks for the tips!

    Screen Shot 2012-04-16 at 8.49.34 PM.png

    She worked here, so there's a good chance there is something different about what you typed in the price line and as I walked, and I think I see. I left out the colon after the SRP. Sorry about that.

    Try this way: (\d+(\.\d\d)*) (\(SRP\): \$)(\d+(\.\d\d)*)

    If it still does not respond, it's probably the spaces (there is an ordinary space before and after \(SRP) :) and you could use (\d+(\.\d\d)*)(\s\(SRP\):\s\$)(\d+(\.\d\d)*) that will pick up any sort of white space where there is a fixed width space or a tab.

  • Need help with regular expression

    I have a string like: separation by a comma as G, H, L

    the table has values like this

    Col1 Col2
    ROW1 G
    ROW2 F
    ROW3 L

    What is trying to achieve is to find out if G or H or L in the string of separated by commas are in col2. is it possible by using regular expressions or not we do split and the loops?

    Thanks in advance.

    Hello

    ora1001 wrote:
    I have a string like: separation by a comma as G, H, L

    the table has values like this

    Col1 Col2
    ROW1 G
    ROW2 F
    ROW3 L

    What is trying to achieve is to find out if G or H or L in the string of separated by commas are in col2. is it possible by using regular expressions or not we do split and the loops?

    Thanks in advance.

    You don't even need regular expressions

    INSTR ( ',' || col1 || ','
          , ',' || col2 || ','
          )
    

    will be greater than 0 if (and only if) co12 is one of the elements of col1.

    If you're curious, a way of using regular expressions is

    REGEXP_LIKE ( col1
             , '(^|,)' || col_2 || '($|,)'
             )
    

    but it will be less effective than Instr.

    Published by: Frank Kulash, November 5, 2010 11:38

  • Need help with the installation of an adapter of Palit GeForce 9500GT Super chart - 512 MB in a M2N68 (narrated

    Need help with the installation of an adapter of graphics Super Palit GeForce 9500GT - 512 MB - DDR2 SDRAM in a M2N68 motherboard (narra6). Should I disable the onboard graphics in the bios? When the card is installed, no VGA work outs and the PC does not start. Checked and recontroler implementation of the card in the PCI slot. PC is a desktop HP G5200uk PC. Windows 7 operating system.

    Hello

    The link below is a guige to install a video card in your Pc.  In particular, it seems that you will have to perhaps specify the location of the new card in the bios and save this change before you install the new card - see step 4 in the guide on the link below.  If your new card fits into the PCI Express x 16 slot, you will need to define PCI Express in the bios and save the changes.

    http://support.HP.com/us-en/document/c01700855

    Kind regards

    DP - K

  • Help with GREP

    Hello world!

    I need assistance with grep style.

    I want to apply a character with "BOLD" for each text style, in a specific paragraph style, Reed media before uppercase.

    For example:

    -Za ispušta proizvod u CIJEV ZA OBLIKOVANJE vaganje Sustav (1)...

    Must be:

    -Za ispušta proizvod u CIJEV ZA OBLIKOVANJE vaganje Sustav (1)...

    Can someone help me?

    Try this one: find \u[\x20\u]+? ( ? =\()

    In other words,.

    \u followed by capital

    [\x20\u]+ one or more space (\x20) or a capital]

    (? = \x20\ () followed by a space and an open parenthesis - but don't capture the spece and the parenthesis)

    In the format change Panel, set "BOLD".

    Peter

  • Need help with query between 2 dates

    Hello

    I did not SEE in a long time and need help with a simple query.

    I have a table of DB access with 3 fields, name, date and number

    What I want is to create a query to retrieve all the names between 2 dates

    When I ask the date field, the results are showing in this formats 2013-07-12 00:00:00

    Here's my query

    < cfquery datasource = 'mydb' name = 'test' >

    SELECT name from myTable

    where edate between ' 2011-01-01 00:00:00 ' AND ' 2013-01-01 00:00:00 '

    < / cfquery >

    < cfoutput query = 'test' >

    #name #.

    < / cfoutput >

    What I get is this error

    ODBC = 22005 (assignment error) error code

    [Microsoft] [ODBC Microsoft Access driver] Type mismatch of data in the expression of the criteria.

    Don't know what I'm doing wrong here.

    Please let me know.

    Thank you

    SELECT ename

    FROM MyTable

    WHERE edate BETWEEN

    AND

    #ename #.

  • I'm suddenly needing help with my browser Firefox (6.0.2)

    Hello
    I'm suddenly needing help with my browser Firefox (6.0.2)

    (OS: I use Windows XP).

    When I open the browser, I don't see is a totally white screen of white, with all the toolbars at the top.

    I know that my physical connections are very good: I have tested the modem, turned the pc market etc and I can also receive/send emails.

    This problem started today, September 8, 2011 and has never happened before.

    Is it a coincidence that Firefox itself to day before I disconnected yesterday evening? Could this be something to do with this particular new update?

    I also noticed that just before I "opened" Firefox, I now get a small box indicating:

    [JAVASCRIPT APPLICATION]
    Handl exc in Ev: TypeError: this oRoot.enable is not a function

    This never appeared before - I hope that it offers a clue has what is wrong.

    The browser not be stuck in Mode safe, said by the way.

    Of course, I can't find solutions to the problem on the internet, I don't physically see all Web sites!
    (A friend sends this request in my name from their pc)

    Any light you can throw on this problem of confusion would be much appreciated. I'd rather not have to uninstall and reinstall Firefox if possible.

    If the only option is to uninstall Firefox and reinstall from your site, I'm also in trouble (I can not see the internet or download).
    In this case, would you be able to send the .exe file as an attachment to my e-mail address? In the affirmative, please let me know and I'll give you more details.

    Thanks in advance.

    One possible cause is security software (firewall) that blocks or limits Firefox or plugin-container process without informing you, possibly after the detection of changes (update) for the Firefox program.

    Delete all rules for Firefox in the list of permissions in the firewall and leave your firewall again ask permission to get full unlimited access to the internet for Firefox and the plugin-container and the update process.

    See:

    Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the extensions of the origin of the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > appearance/themes).

  • Need help with installation on Photosmart C7280 all-in-one

    I had my printer is installed and has been using the printer for 3 wireless laptops in my house.  Now, I can't even find my backup drive, so I have need help with downloading the software to use my printer and also get to use wireless.   I don't know what happened, but the fax for this printer is listed, but not the printer itself.   Help, please!

    Click here to download the software for your printer:

    http://h10025.www1.HP.com/ewfrf/wc/softwareCategory?product=3204785 & LC = on & CC = US & DLC = in & lang = to & CC = US

    has chosen the appropriate operating system that corresponds to your computer and download the full software features.

  • HP laptop: need help with internet and search for things

    whenever I'm on chrome internet explore google ect and go to tab it is says unknown error or no internet connection or anything and just takes me chrome ect. I need help with this im involved in a byod class and my computer won't let me on what whatever usually it just starts out black and white and the seeds I my search request

    Yes it's a Windows 10 and it arrived already installed I'll take the other info now

  • need help with my window is in thai and I do not understand to all.how to convert to English?

    need help with my window is in thai and I don't quite understand.
    How to convert to English? I tried for days but still it cannot be changed.
    because I can't read thai... Please help me step by step...

    my pc is touchsmart 9100 windows 7 Professional.

    Not a single word is in English if I go to the "region and language" to change.

    Everthing is in thai in the system.

    Hello

    Where have you bought the PC?

    What is the operating system installed?

    Best regards

    ERICO

  • I need help with an installation failure to interpret and troubleshoot a Setup log.

    Background: A few years ago, many editors of cinema used Final Cut Pro 6 (also contained in Final Cut Studio 2) for their editing projects.  Shared Apple Final Cut X uses a different format that is not compatible with FCP6.  Sometimes, these editors are called to work on a few historical projects that have been published in FCP6 and need this version to run now.

    Starting with OS X Lion, FCP6 would install not in Lion and thereafter.

    According research by Jeremy Johnston as noted on his blog, he discovered that Apple has inserted a file in the folder CoreServices in the Library folder of the system folder that causes versions the version Final Cut Pro X (and other older Apple programs in the same situation) do not settle.  He suggested changes to this file that would seek to prevent interfering with the installation of FCP6 in Lion, many users of final cut PRO 6 were successful in their efforts to install in Lion and work with it.

    Later in a discussion update on installing FCP6 in Mavericks, HawaiianHippie determined that the simplest way to perform the installation of FCP6 was simply copy this file and remove it from the system folder, install FCP6 and then restore the copied file:

    https://discussions.Apple.com/message/26309669#26309669

    I used this method with success to install FCS2 in Yosemite:

    [click on images to enlarge]

    However, in my attempts to install FCS2 in El Capitan, it fails in the last 5% to install the first DVD:

    First of all, I need advice on how to display an extremely large Setup log in this thread (on MacRumors, it is a method to insert a 'code' in a small box that can be the object of a scrollbar if necessary to read all along).  I am unable to find such a method to post here.

    Then once approved, I need help to determine which component is causing the installation to fail and perhaps this element can be omitted from the installation:

    If this element is not required, then maybe FCP6 can be installed successfully without it.  And if that omitted element is necessary, perhaps a manual method to install it can be determined by pacifists.

    It is my goal to help those who need to install and use FCP6 on their new Macs running El Capitan.

    Here is the post on MacRumors with pre-installed Setup log:

    http://forums.MacRumors.com/threads/i-need-help-with-an-installation-failure-to-interpret-and-troubleshoot-an-Installer-log.1954786/#post-22541389

Maybe you are looking for

  • Cannot use the search feature on the App Store

    Hello I have a problem with the search feature in the App Store. This problem only occurs when connected with my Apple ID, everything in the App Store itself works very well. Only when it comes to the search I get an error "the App Store is temporari

  • Test Sony Action Surf cam!

    It was the first test of strong surf with the camera. perfect with foot 2 chunky swell morning! Had a few questions misting and editing for Bodyboarding! but was perfect otherwise, Let me know if you have techniques and other editing improvements I h

  • How to download and install Red Faction

    Ok. I downloaded games for Windows, but when I download RedFaction after downloading it do anything and I am new to PC games please help me.

  • Start the print spooler. If it has changed

    The way the departures of up to changed print spooler? I'm sure that if you have created a printer on the computer share and on computer B that are linked, this computer only had to be fed up to let computer B using the printer. It seems now that com

  • BlackBerry smartphones is the voltage double torch

    I'm heading to Europe, of Canada tomorrow and don't can't figure out whether the torch is bitensión. I used to have the "BOLD" and it even came with a record for Europe, but also in North America. My new lamp does not work, then I'll try to understan