Problem with GREP - find only the 1st occurrence

Hi all

In the example below, I'm trying to find the text between pairs of characters $ .

1.png

Theoretically, it should work - \$\s.+?\s\$ - but in practice, he finds that the 1st instance. I can't understand why.

It is interesting in JS, this phrase works as expected.
I select text and run the script:

Main();

function Main() {
    var doc = app.activeDocument;
    var sel = app.selection[0];
    var contents = sel.contents;
    var match = contents.match(/\$\s.+?\s\$/g);
}

And it returns all occurrences of four:

2.png

What I am doing wrong?

Thanks in advance.


Kas

We could improvements, adds Adobe InDesign GREP and now the character $ gets a little hackneyed. He did likewise for me (only find 1 here), but I got it to work using

\x24\s.+\s\x24

(where "\x24" is the hexadecimal representation of "$").

Tags: InDesign

Similar Questions

  • Problem with player search - only the First Instance is highlighted

    I use WIN 8.1 with Adobe Acrobat Reader DC [15.10.200056.167417 'updated 12/18/15"indicated in the program properties] as my default PDF reader.

    Until recently, I was able to do a search of words/texts of .pdfs using CTRL-F, who showed me every instance highlight of this word.  I would simply hit 'find' several times.  These days, only the first occurrence of the word is highlighted.  Along the right margin are yellow "tics" that, in my opinion, indicate the existence of other occurrences.

    If something has changed in the drive?  Some can tell me how to regain the ability that I hope

    mikec2222 wrote:

    Bernd - Do I understand you though, when you search for "" this document, you can find a second occurrence of "the" highlighted by pressing 'find' or 'next' or 'enter' again?  If this is true, my copy of AA CD player must be faulty.  I can't wait to see your response.

    It's true.

  • can someone let me know how to print a scanned document. In printing only the 1st page prints fine as I know that there is more than one document.

    can someone let me know how to print a scanned document. In printing only the 1st page prints fine as I know that there is more than one document.  This is the version Adobe photoshop cc 2014.  Someone said it you use printing quick button but who can't find anywhere.

    Carolyn

    Carolyn,

    I don't know if Photoshop is the best solution for the printing of DOCUMENTS scanned.  Photoshop opens a page of a DOCUMENT at a time, let's say you have a MultiPage PDF Document, when you open with the PS, tell him what page you want to open. Once you do, it will convert this page into basically a picture, a raster file that can be edited like a photo.  So if you go to print, it prints only one page, you have open...  So, if you have opened the first page of your document and go to print it, which explains why it only prints the first page.

    So is what file type of the document that you are trying to print?  If it's a PDF file, I opened it with Acrobat/Reader, depending on whether you have and that FILE you > PRINT it like that.   Or is there a particular reason (Lighten/Darken/increase contrast etc...) you are needing to go first to Photoshop?

    Give me a little more information on exactly what you're trying to do and I'll do my best to provide a workflow easier to achieve your final goal.

    I hope this helps.

  • Problem with Windows Update after the new installation of Windows 7 Pro the Lenovo ThinkPad X 200

    I'm trying to do a fresh install of Windows 7 Pro on a Lenovo ThinkPad X 200. The product key is easy to find on the sticker of the ThinkPad. However, the version of Windows is hidden (for example, I can't check that my ThinkPad had originally installed Windows 7 Pro). I was able to install by using a Pro Win 7 SP1 CD ROM I bought for another installation. I used the ThinkPad I was trying to make the new facility on the product key. I was able to activate the Windows 7 Pro using the phone call and my cell phone. I checked the activation! However, I have problems with Windows update. The product key may be a different version of Windows 7. If so, why did it install and activate OK? Y at - it a fix for this problem or I have to buy a new version of Windows 7 Pro? Please note that I have not yet installed all drivers Lenovo ThinkPad as I can't seem to install correctly. Thank you!

    Since the issue is updated to Windows, it is not a product number key.

    You can reset the Windows Update components by running the Fixit on this page. But if there is malware present, she will continue to reset the connection to the update servers:

    How to reset the Windows Update components

    http://support.Microsoft.com/kb/971058

    Suggest you download and save the Fixit. Then configure the system before the clean boot by running:

    How to troubleshoot a problem by performing a clean boot in Windows Vista/Windows 7

    http://support.Microsoft.com/kb/929135

    Once the Fixit has been downloaded and the system is started in the pure State, check that the native Windows Firewall is now on if a 3rd party firewall has been used previously. Now run the Fixit and choose the default mode. Restart once it's done and see if the system can be connected to the update servers. If he can't, then rerun the Fixit and choose aggressive mode. Turn it back on when he finished the race and updates.

  • I have problems with my application of the java language.

    I have problems with my application of the java language. It will be open only for about one second, and it won't let me write all programs, it looks like the command prompt when opening. what the * is underway and what can I do to solve this problem.

    Hey Kevin,

    The description of the problem seems a little unclear and I wish I had a better understanding before you start working on it.

    I would really appreciate if you could answer the following questions:

    1. is the specific question of the application of the Java language?

    2. did you of recent changes made to your computer before the show?

    3. you receive an error code or message?

    Please provide us with more information on the specific question to help you to fix as soon as possible.

    If the problem is specific to the Java application, then I suggest you to contact Java support from the links below:

    http://www.Java.com/en/download/support.jsp

    Java Help Center:

    http://www.Java.com/en/download/help/

    Your response is very important for us to ensure a proper resolution. Please get back to us with the information above to help you accordingly.

  • my computer will not install itunes 10.5, it tells me "Setup has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2330.

    original title: Itunes problem

    my computer will not install itunes 10.5, it tells me "Setup has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2330. "What should I do?

    Contact the manufacturer (Apple) of the application (iTunes) you are having problems with.

    Uninstall all previous versions, try to download (re-record not running) and then do a right click on it and RUN AS ADMINISTRATOR.

    (Vista 32-bit or 64-bit)?

  • Problem with silverlight download, download the error code 2104.

    Original title: problem with Sliverlight download
    get the error code 2104. tried to uninstall and reinstall

    Hello

    Thanks for the reply.

    We are pleased to know that the problem is solved. Please do not hesitate to answer, in the case where you are facing in the future other problems with Windows. Please contact the Windows community.

  • I have problem with value NULL when the use CASE statement please help this question

    I have problem with value NULL when the use CASE statement please help this question


    Table: digital_val

    SNO cl C2

    1 San1 11

    2 22 San2

    Actual result: expected to A         B

    A            B                                                                           11        22

    11 NULL

    22 NULL



    query:

    Select case when c1 = "san1" then c2,.

    case If c1 = "san2" then c2 B

    of digital_val

    I'm more curious why, when you select 2 rows, you expect a result of row?

    WITH digital_val

    AS (SELECT 1 AS 'Sno', 'San1"C1, c2 FROM DUAL 11)

    UNION ALL

    2 SELECT AS 'Sno', 'San2"C1, c2 FROM DUAL 22)

    SELECT CASE WHEN c1 is "San1" THEN END AS A c2.

    CASE WHEN c1 = "San2" THEN END AS B c2

    OF digital_val;

    With no other input, if you select 2 rows, you get 2 rows.  One of the other solutions use a max function, but is this really what you want, does not specify?

  • Bridge does not open? Initially the 8.1 Win & problem had started. Have now earn 10 & still a problem with not to open the bridge?

    Bridge does not open? Initially the 8.1 Win & problem had started. Have now earn 10 & still a problem with not to open the bridge?

    Hi Matthew,

    If you use Bridge CC, update to the latest version 6.2. Adobe Bridge CC 6.2 version now available! Adobe content corner

    1. Please, do a right-click on the bridge on the desktop icon and select "Run as Administrator".
    2. If this does not help, reset the Bridge preferences and then try it.

    Steps: -.

    Start Adobe Bridge, and immediately press Ctrl + Alt + Shift (Windows) or command + Option + shift (Mac OS down) until the dialogue box reset settings appears.

    Select all three options - reset preferences, reset Standard Workspaces and all miniature Purge Cache - and then click OK.

    Reference: troubleshooting errors, freezes | Adobe Bridge | Windows, Mac OS

    Let us know if it works.

    Kind regards

    Assani

  • problem with bind variables in the SQL query view object

    Hi all

    I use JDev 11.1.2.4.0.

    I have a problem with bind variables in the SQL query view object.

    This is my original SQL

    SELECT sum(t.TIME) , t.legertype_id
    FROM LEDGER t
    WHERE t.nctuser_id = '20022' 
          AND to_char(t.insertdate,'YYYYMMDD') in ('20130930','20130929')
    group by t.legertype_id
    

    In my view .xml object query tab, I am writing this

    SELECT sum(t.TIME) , t.legertype_id
    FROM LEDGER t
    WHERE   t.nctuser_id = '20022'
        AND to_char(t.insertdate,'YYYYMMDD') in :dddd
    group by t.legertype_id
    

    Davis here is a variable of Type liaison: String, updatable and necessary.

    I try to deal with Davis as ('20130930 ', ' 20130929') hoping the view object, run as my original SQL.

    But failed. The view object retrieves 0 line after that I run.

    Why?

    Thank you! ('2original SQL0130930', '20130929') ('20130930 ', ' 20130929')

    A variable binding cannot be used as this is why you must use years table. Check decompilation binary ADF: using oracle.jbo.domain.Array with ViewCriteria to see a solution.

    Timo

  • Problem with Textfield autocomplete--> only use the INSTR function

    Hello team dev,

    I use the new "textfield autocomplete" item type APEX and you have a crazy problem with it.

    I have a table with an index on the same column I want to search with AutoComplete field.

    Index:
    CREATE BITMAP INDEX TEST.GEO_DATA_IDX1 ON TEST.GEO_DATA (postcode)
    NOLOGGING TABLESPACE TS_INDEX;
    Select which is automatically generated by APEX 4:
    SELECT   a.*
      FROM   (  SELECT   DISTINCT postcode AS RV
                  FROM   TEST.GEO_DATA
                 WHERE   country_id = :P1_COUNTRY
              ORDER BY   1) a
     WHERE   INSTR ("RV", :p$_search_string) > 0 AND ROWNUM <= :p$_max_rows;
    
    -- plan
    Plan
    SELECT STATEMENT  ALL_ROWSCost: 4,308  Bytes: 45,31  Cardinality: 1,97            
         2 SORT UNIQUE  Cost: 4,307  Bytes: 45,31  Cardinality: 1,97       
              1 TABLE ACCESS FULL TABLE #TABLE# Cost: 4,306  Bytes: 47,311  Cardinality: 2,057  
    The APEX 3, I used the addon of Tyler Muth with my own Select:
    SELECT   DISTINCT
                postcode AS DV,
                postcode AS RV
         FROM   TEST.GEO_DATA
         WHERE   country_id = L_COUNTRY
         AND    postcode like l_search||'%'
         ORDER BY 1
    
    -- Plan
    SELECT STATEMENT  ALL_ROWSCost: 840  Bytes: 152,867  Cardinality: 13,897                                
         8 SORT ORDER BY  Cost: 840  Bytes: 152,867  Cardinality: 13,897                           
              7 HASH UNIQUE  Cost: 838  Bytes: 152,867  Cardinality: 13,897                      
                   6 VIEW VIEW index$_join$_001 Cost: 836  Bytes: 232,111  Cardinality: 21,101                 
                        5 HASH JOIN            
                             2 BITMAP CONVERSION TO ROWIDS  Cost: 31  Bytes: 232,111  Cardinality: 21,101       
                                  1 BITMAP INDEX RANGE SCAN INDEX (BITMAP) #INDEX#
                             4 BITMAP CONVERSION TO ROWIDS  Cost: 45  Bytes: 232,111  Cardinality: 21,101       
                                  3 BITMAP INDEX SINGLE VALUE INDEX (BITMAP) #INDEX#
    Is there a chance to get my INDEX used by the new element of the APEX? I do not. But I still want to ask before I just rebuild. :)

    Best regards

    Tobias

    Hi Tobias,.

    I guess that you are currently using "contains and case sensitivity ' to the attribute of"search ". Have you ever tried out "Exact and case sensitivity? Because that internally uses the LIKE operator as does your original query and the % is at the end, she must allow the use of an index. But it might still work, because ORDER BY can be run at a different time in your original example, but it's worth a try.

    Concerning
    Patrick
    -----------
    My Blog: http://www.inside-oracle-apex.com
    APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • Grep for styling the second occurrence of a Word

    Hi all

    I'm putting a dictionary for children.

    name of the bicycle

    a vehicle with two wheels in tandem, usually propelled by pedals attached to the rear wheel by a chain and have the handlebars for steering and a saddlelike seat. • Some find it faster to ride a bicycle and weaving through cars to take the bus or drive a private car.

    I managed to match the first occurrence of the bicycle to the second (underlined below) using the following grep.

    (?:^( \w+).+\r.+(\r.+)?) (\1)

    bike noun

    a vehicle with two wheels in tandem, usually propelled by pedals attached to the rear wheel by a chain and having the steering handlebars and a seat saddlelike. • some found it quicker to mount a bike and weaving through cars to take the bus or drive a private vehicle.

    This grep (that which) works as expected in the dictionary, but now I need to be able to select only the second word (in italics and in red in the example above) to be able to give him the correct character style.

    Any help would be greatly appreciated.

    Thanks in advance.

    Stephen

    GOAL!

  • Problems with Mail running under the Sierra

    Mail does not display / download (PDFs, etc) attachments in emails that are sent to my e-mail hotmail.com account. The correct size of the email received is indicated, but the ether attachments are not visible or are not complete. This problem occurs only with the emails that are sent tony hotmail account, another account of e-mail (gmail, web.de, mail etc.) are not affected by this problem. I already deleted the account and reinstalled, resynchronized the account, check the correct IMAP - settings, nothing worked. Now, I demoted via Time machine to El Capitan. Now, everything is shown correctly without attachments are missed under El Capitan. Because the time machine really not added some attachments I ve some files lost unfortunately! Very good performance! I really disappointed m from Apple!   Is there a solution for this problem?

    Often, with large attachments; I could not find a systematic reason I don't have a hotmail account, but just a normal IMAP account.

  • Problem with Mail storage on the iPhone 6.

    OK, I have a problem with my mail. That is, it uses 1.2 GB of data. I cleaned all my emails and deleted all the big files. Nothing has changed. So I deleted all e-mail accounts. Still no change. When I plug my phone in iTunes, it says there 2.49 GB free yet my phone says I only have 337 MB of free space. Yes, I tried to sync and see if that has nothing and he did not. No idea what continues?

    Try to reset your email account in this order.

    First close your Mail application completely from the window of the selector app by double clicking the Home button and drag the email preview pane up until it disappears from the display. Then go to settings > Mail, Contacts, calendar > find your e-mail provider and click on the account. On the next page, delete the account. Then perform a forced reboot. Hold down the home and Sleep/Wake buttons simultaneously for about 15-20 seconds , until the Apple logo appears. Then go to settings > mail... and to add the account.

    iTunes and iPhone storage almost never fit. The amount of iTunes is an estimate, the phone is the exact amount.

    Different amounts of 'Available' reported by iPhone and iTunes

    If the above is not enough, you may need to do a system restore. First save your device via iTunes. Also import your photos on your computer and copy all the important data. Reconstruction of the support first test and test. If this does not help, you may need to restore as a new and reconfigure from scratch as the backup may be damaged. It is important to have your photos and your saved data separately from the backup. Here are the steps for a restoration:

    https://support.Apple.com/en-us/HT201252

  • Problems with iframes cached after the upgrade to Safari 9.1

    I have a problem that Safari is caching my iFrames.

    What follows (pseudo) HTML (well, it's an aspx page) is OK in Safari 9.0:

    < html >

    < body >

    < iframe id = "page1" src = "Page1.aspx" / > "

    < iframe id = "2" src = "Page2.aspx" / > "

    < / body >

    < / html >

    in Safari version 9.1, although

    1. caching is disabled in the developer toolbar

    2. I got Mac + R to reload the page

    It will still not send a call to the page 1 or page 2 but rather pull server to an older version of this page.

    I know that I could add? Rnd = $ () or something similar now, however, this aid only in part, from a post (postback) inside the iframe, once again, will be the cached page.

    Others out there who have found a solution? I also didn't put all the prama no cache etc. to avoid that, no luck.

    I tried this also in El Capitan with the same result it looks like to be connected to the update of Safari 9.1 (10601.5.17.4)

    Safari/Preferences/Advanced - activate the menu to develop it, then go ahead and empty Caches. Quit/relaunch Safari and test. Then try Safari/history/Show History and remove all items from the history.  Quit/relaunch Safari and test. You can also try try Safari/Clear History... The downside is that it deletes all cookies. It could upset some sites no longer recognizes your computer as one that has visited the web site. Go to Finder and select your user folder. With this Finder window as the windshield, select Finder/display/display options for presenting or order - J.  When the display options opens, check "show the library folder. This should make your visible user library folder in your user folder.  Select Library./Caches/com.apple.Safari/Caches.db, and then move it to the trash.

    Go to Safari preferences/Extensions and disable all extensions. Test. If correct, enable the extensions one by one until find you which extension is causing the problem.

    Corruption Safari       See post by Linc Davis

Maybe you are looking for

  • Problem setting up family sharing

    I just bought my daughter an iPod touch and I would like to add to the family sharing. I created an email for it in hotmail. Checked his age avec.50 at Microsoft. My problem is when I click on iCloud and click on the family, it is said that an invita

  • Adapters WiFi RT5390R and RT3290

    Hi all Is it possible to confirm if RT5390R and RT3290 WiFi adapters use in some of the mobile Pavillion, work only in the 2.4 GHz band, or in the 5 GHz band? Thank you very much in advance João Belo

  • e-mail a slide show

    I have photos stored on the hard drive that I want to record a slideshow and then e-mail to friends. I chose the pictures , I want and thet display in a slide show, but how do I save like that and by e-mail.

  • How to use the tool replace color with the white foreground color?

    I have a black and white image that contains text. I want to change the white area to a specific color.Using the Replace Color tool, it doesn't seem to work by selecting the white - he will only select black.I need to keep black text not affected.Can

  • Loop through objects of image to make it visible

    I have two pages (Page1 and Page2) masters. Both have two (TFCLogo and YFLogo) image objects that are configured to be invisible at the top of each master page. When the user selects one of the two companies of an object in the drop-down list (CoPerf