Problem with GREP - finds only the 1st occurrence

Hi all,
In the example below, I am trying to find text between pairs of $ characters.
Theoretically this should work — \$\s.+?\s\$ — but in practice it finds only the 1st occurrence. I can’t figure out why.
Interestingly enough, in JS this expression works as expected.
I select the 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 the four occurrences:
What am I doing wrong?
Thanks in advance.
Kas

Hi Kasyan
In case your interested (probably not, but Jongware has a nice picture that's (maybe) worth seeing) here's a thread were Marc and I discussed how to find the first and last GREP occurrence in a paragraph / story and the use of the $ and ^ symbols.
http://forums.adobe.com/message/4668083#4668083
Regards
Trevor

Similar Messages

  • Problem with GREP finding

    Hi Experts
    I am trying to find text using GREP option:
    <k6>
    para 1
    para 2
    para 3
    </k6>
    using this grep function
    app.findGrepPreferences = app.changeGrepPreferences = null;
    app.findGrepPreferences.findWhat = "(?s)<k6>\r(.+?\r)</k6>";
    var myResults = app.activeDocument.findGrep();
    while I am executing this script the end of paragraph marker "\r" automatically changed to SPACE( ) in the FIND/CHANGE dialogue box. If i change the space manually to \r in find/change dialogue box it works fine. Why executing from script this changes happen? Any one experienced this before.
    Kindly suggest.
    Thanks in advance

    You mean the input appears to have changed to a space when you check what's in the Find box? That is normal behavior. Since you are using Javascript strings, codes such as "\t" and "\r" are *immediately* translated into their literal characters *before* being processed any further. So you don't write "\r" into the Find dialog, you are writing a literal hard return character. The Find/Change dialog cannot show that character on screen so it displays a space.
    You say "if I change it to \r it works fine" -- do you mean that it does *not* work if you leave it that way? Because it should work just fine. (And you actually can have a little fun by inserting all kinds of 'special' characters literally into the Find dialog -- try tab or newline.)
    But if it bothers you for cosmetic reasons, use "\\r" instead. The double backslash is also a special Javascript string escape and will be replaced (immediately) with a single backslash. Then the string that goes into the Find dialog is "\r", and that's what InDesign is going to translate back to a hard return when it's processing your find string.

  • I have a 13.5 month old Ipad2, wifi only that has had problems with wifi com from the beginning. I am learning that this is not unusual for apple. Any suggestions?

    I have a 13.5 month old Ipad2, wifi only that has had problems with wifi com from the beginning. I am learning that this is not unusual for apple. Any suggestions?
    ronald1094

    Try #5.
    Some things to try first:
    1. Turn Off your iPad. Then turn Off (disconnect power cord for 30 seconds or longer) the wireless router & then back On. Now boot your iPad. Hopefully it will see the WiFi.
    2. Go to Settings>Wi-Fi and turn Off. Then while at Settings>Wi-Fi, turn back On and chose a Network.
    3. Change the channel on your wireless router (Auto or Channel 6 is best). Instructions at http://macintoshhowto.com/advanced/how-to-get-a-good-range-on-your-wireless-netw ork.html
    4. Go into your router security settings and change from WEP to WPA with AES.
    5.  Renew IP Address: (especially if you are droping internet connection)
        •    Launch Settings app
        •    Tap on Wi-Fi
        •    Tap on the blue arrow of the Wi-Fi network that you connect to from the list
        •    In the window that opens, tap on the Renew Lease button
    ~~~~~~~~~~~~~~~~~~~~~~~~~
    iOS 6 Wifi Problems/Fixes
    How To: Workaround iPad Wi-Fi Issues
    http://www.theipadfan.com/workaround-ipad-wifi-issues/
    Another Fix For iOS 6 WiFi Problems
    http://tabletcrunch.com/2012/10/27/fix-ios-6-wifi-problems-ssid/
    Wifi Doesn't Connect After Waking From Sleep - Sometimes increasing screen brightness prevents the failure to reconnect after waking from sleep. According to Apple, “If brightness is at lowest level, increase it by moving the slider to the right and set auto brightness to off.”
    Fix For iOS 6 WiFi Problems?
    http://tabletcrunch.com/2012/09/27/fix-ios-6-wifi-problems/
    Did iOS 6 Screw Your Wi-Fi? Here’s How to Fix It
    http://gizmodo.com/5944761/does-ios-6-have-a-wi+fi-bug
    How To Fix Wi-Fi Connectivity Issue After Upgrading To iOS 6
    http://www.iphonehacks.com/2012/09/fix-wi-fi-connectivity-issue-after-upgrading- to-ios-6.html
    iOS 6 iPad 3 wi-fi "connection fix" for netgear router
    http://www.youtube.com/watch?v=XsWS4ha-dn0
    Apple's iOS 6 Wi-Fi problems
    http://www.zdnet.com/apples-ios-6-wi-fi-problems-linger-on-7000004799/
    ~~~~~~~~~~~~~~~~~~~~~~~
    How to Fix a Poor Wi-Fi Signal on Your iPad
    http://ipad.about.com/od/iPad_Troubleshooting/a/How-To-Fix-A-Poor-Wi-Fi-Signal-O n-Your-iPad.htm
    iOS Troubleshooting Wi-Fi networks and connections  http://support.apple.com/kb/TS1398
    iPad: Issues connecting to Wi-Fi networks  http://support.apple.com/kb/ts3304
    WiFi Connecting/Troubleshooting http://www.apple.com/support/ipad/wifi/
    How to Fix: My iPad Won't Connect to WiFi
    http://ipad.about.com/od/iPad_Troubleshooting/ss/How-To-Fix-My-Ipad-Wont-Connect -To-Wi-Fi.htm
    iOS: Connecting to the Internet http://support.apple.com/kb/HT1695
    iOS: Recommended settings for Wi-Fi routers and access points  http://support.apple.com/kb/HT4199
    How to Quickly Fix iPad 3 Wi-Fi Reception Problems
    http://osxdaily.com/2012/03/21/fix-new-ipad-3-wi-fi-reception-problems/
    iPad Wi-Fi Problems: Comprehensive List of Fixes
    http://appletoolbox.com/2010/04/ipad-wi-fi-problems-comprehensive-list-of-fixes/
    Connect iPad to Wi-Fi (with troubleshooting info)
    http://thehowto.wikidot.com/wifi-connect-ipad
    Fix iPad Wifi Connection and Signal Issues  http://www.youtube.com/watch?v=uwWtIG5jUxE
    Fix Slow WiFi Issue https://discussions.apple.com/thread/2398063?start=60&tstart=0
    How To Fix iPhone, iPad, iPod Touch Wi-Fi Connectivity Issue http://tinyurl.com/7nvxbmz
    Unable to Connect After iOS Update - saw this solution on another post.
    https://discussions.apple.com/thread/4010130
    Note - When troubleshooting wifi connection problems, don't hold your iPad by hand. There have been a few reports that holding the iPad by hand, seems to attenuate the wifi signal.
    ~~~~~~~~~~~~~~~
    If any of the above solutions work, please post back what solved your problem. It will help others with the same problem.
     Cheers, Tom

  • I'm using firefox 6.0.2 It's making problem with Bangla font ONLY on FACEBOOK others bangli website FORNT SIZE are OK. On the FACEBOOK it shows Bangla font in a very / Too small! I change font SIZE in firefox setting but i can't solve. Pls HELP me

    I'm using firefox 6.0.2 It's making problem with Bangla font ONLY on FACEBOOK others bangli website FORNT SIZE are OK. On the FACEBOOK it shows Bangla font in a very / Too small! I change font SIZE in firefox setting but i can't solve. Pls HELP me ..

    Reset the page zoom on pages that cause problems: <b>View > Zoom > Reset</b> (Ctrl+0 (zero); Cmd+0 on Mac)
    *http://kb.mozillazine.org/Zoom_text_of_web_pages
    You can use an extension to set a default font size and page zoom on web pages.
    *Default FullZoom Level: https://addons.mozilla.org/firefox/addon/default-fullzoom-level/
    *NoSquint: https://addons.mozilla.org/firefox/addon/nosquint/

  • Am I the only one having problems with ringer volume since the update?

    Am I the only one having problems with ringer volume since the update?? I'm hard of hearing and before updating to IOS7 I could hear my alarm and ringer just fine. Volume is turned up all the way and I've chosen the loudest sounds I could and still having a difficult time hearing.

    Annie Hall is available on DVD only.
    It is not available for streaming and I believe movies available for streaming are the only movies available with the Netflix app on an iOS device.

  • TS1702 problem with updated find my iPhone app: when I attempt to open the FMi app, it tells me that I need to be a registered developer and run iOS7 to do so; is anyone else having this problem?  I got the app as a regular update to my existing FMi app w

    problem with updated find my iPhone (FMi) app: when I attempt to open the FMi app, it tells me that I need to be a registered developer and run iOS7 to do so; is anyone else having this problem?  I got the app as a regular update to my existing FMi app which worked great.

    The problem is being reported in the news media, yes. Apparently someone at Apple jumped the gun and uploaded the update before it was ready. They'll probably issue another update shortly, I would expect, but you can go here:
    http://www.apple.com/support/itunes/contact/
    and follow the instructions to report the issue to the iTunes Store. If you have a backup copy of the older version of the app, remove the newer version, restore the old version to iTunes on your computer, and resync.
    Update: Well, that was certainly quick. As of a short time ago, various sites are reporting that the Find My iPhone app is no longer displaying the previous error message. If it still is for you, delete it from your iPhone and re-download from the iTunes Store.
    Regards.

  • Chart - problem with realize one of the function under CR XI

    Post Author: mrowa
    CA Forum: Charts and Graphs
    Hello,
    I have
    problem with realize one of the function under CR XI. I would be persuade if
    any of us would like to help me.
    1)   
    1) From
    database (basically from one table), I take data to make report. Each of record
    have appropriate fields:
    dteData
    intYear
    intMonth
    intDate
    2)   
    2) I
    want to realized comparison data from two or more periods of time on one chart
    and in one table. For easily explanation I will describe problem on two
    periods.For instance, user want to display and compare
    on chart date (type monthly -sum data of each month) from 2007.02 u2013 2007.05
    with date from 2006.03 u2013 2006.06. So we compare month 2007.02 with 2006.03;
    2007.03 with 2006.04; 2007.04 with 2006.05; 2007.05 with 2006.06
    On char I would like to display bars with comparison
    of months.
    Problem is that I donu2019t know how to write
    something similar. I can use one period without any problems, but two and mores
    I canu2019t realized.
    Detail description:
    I passed
    two parameters two report:
    {?from}, {?to} u2013for first period
    {?offset}, it means {?from}+{?offset},
    {?to}+{?offset}  - for second period
    On axis Y I have Sum(intDate);On
    X (year + month). But on each value x( example 20007.02) I need to have
    two values (bars). Value for standard period and offset.
    For example for x=2007.02, I need
    two bars one equal 2007.02 and second with offset u2013 2006.03
    Movement to next value (bar) is
    persuade by fields {data.rok}&{data.month} first or second period. This is
    combination of two elements year&month defined under Formula. Problem
    persist in that both period has different year.month and here problem starts once
    again. I donu2019t know how to solve it. I have found out one solution but it
    limits user only for two periods (I want to compare more).
    My idea for compare only two
    periods:
    I make one query in CR for one
    period and second query for second period.
    Firs query:
    "SELECT 
           year ,
          month
    Second query
    "SELECT 
           year + FLOOR({month + offset} % 13),
          {month + offset} % 13
    Then in CR I connect two periods and
    make u201Ctableu201D (results of queries) with JOIN on fields year and month.
    This solution is not functional,
    because I need to make reports for days and hours as well. In this solution I
    canu2019t use (%31), because not all months has 31 days.
    I use CR in WEB app made in Visual
    Studio 2005. Maybe from aspx we can manipulate with date to get exact solution,
    and solve problem with SELECT.
    Hope my description clearly
    describe problem and someone will be able to help me. I would be thankful.

    I have had similar problem before.
    Because I had too many data, the legend would not display all the data. Also the chart would not display all the data. But I was able to find a work around.
    In your case, Right click on the Legend text and click on Format Legend Entry.
    Change the font of the legend to 4 (which is the minimum). This may work.
    If you are also having problem with data labels, you could change the font size of the data labels.
    Hope this helps.
    Thank you.

  • Problem with LILO to loading the OS

    Hello everyone.
    We have a problem with LILO to loading the OS in a CS-MARS 110R, find attached a screenshot.
    The only solution is recovery the MARS Operating System.
    Thanks in advance.
    Regards
    Antonio

    Hi Matthew.
    The re-image was impossible because this CS-MARS didn´t read the DVD correctly (hardware error) and we asked to Cisco a RMA.
    Thanks
    Antonio

  • I want to print with black ink only, the OFFICE DEPOT salesman told me that he turned off the color.

    I want to print with black ink only, the OFFICE DEPOT salesman told me that he turned off the color.  I don't want to buy colored ink,  I don't use it.

    HI,
    Welcome to the HP Forum!
    topdog3647 wrote:
    I want to print with black ink only, the OFFICE DEPOT salesman told me that he turned off the color.  I don't want to buy colored ink,  I don't use it.
    Please identify your notebook/pc /printer.
    Look at the base/rear/side of the notebook/pc/printer at the barcoded sticker.
    Post item number 2 as seen on the following example of an HP notebook's barcoded sticker. The barcode on your HP product may be slightly different in appearance, but will still have the important information needed for us to help you.  
    ###Do not post the serial number of your product as it is personal information.###
    If your printer is a laser printer then simply go to print preferences and select grayscale printing
    Best regards,
    erico
    ****Please click on Accept As Solution if a suggestion solves your problem. It helps others facing the same problem to find a solution easily****
    2015 Microsoft MVP - Windows Experience Consumer

  • Error while posting GR from EWM in ECC. "Problem with receiver finding"

    Hi
    I have completed putaway of inbound delivery in EWM. This has triggered PPF to ECC for GR posting. This is stuck in ECC SMQ2 with error "Problem with receiver finding".
    I have checked ECC>EWM interface configuration. Handling unit management setup in ECC and EWM. Do not see any issues there. Also tested GR account postings with IM storage location for Po in ECC. This is also working fine...so no issue with account determination.
    Unable to figure out what is causing issue. Please help. Thank you.
    Best Regards
    phani sai MN

    Hi All
    Thanks for your responses. Issue was with distrubution model fiter parameters. for message type InboundDelivery.Deliverychange there was additional filter parameter for logical system. Removed values for logical system and only retained warehouse number.
    With this issue is resolved. GR is posted succesfully in ECC.
    Best Regards
    Phani sai MN

  • Problem with iWeb 09, after the publication in a local file.

    *Subject: problem with iWeb 09, after the publication in a local file, i can't see my blog, nor my photos, but before that all was working fine.*
    After the publication in the local file, I see all my pages, but there is a mistake on the page "Blog" where I just can see the top of my page, it's cut and I can't see it entirely, so I can't see the inputs while I should see 3 news or 3 inputs. And it's the same for the "Photos" page where the page is cut, I can't see the photos, and it's just written : "Put the slide show and subscribe".To finish, when I want to activate the comments, it doesn't work neither.
    Please help me.

    I want to activate the comments, it doesn't work neither.
    The comments feature is only available when you publish to the MobileMe server, so I don't think you can use it when you publish to a local file.

  • When I make a project in iDVD'09, there are sometimes green blocs with points flickering in some scenes of my iMovie-film. In iMovie there is no problem with this film, but the problem begins by exporting to iDVD and making a project there.

    When I make a project in iDVD'09, there are sometimes - at voluntary moments - green blocs with points flickering in some scenes of my iMovie-film.
    In i-Movie there is no problem with  this film, but the problem begins by exporting to iDVD and making there a project.
    Who can help me, then I cann't find everything about this in any forum?

    Hi
    Can be a problem that get multiplied and visible when iDVD encode for DVD.
    A. See if problem can be isolated to a single frame in the movie and re-import this clip and see if it's better
    B. When free space on Start-Up hard disk goes low - strange things like this might occure. I never go under 25Gb free space on this Start-Up Mac OS hard disk !
    C. Does this problem arises what ever encoding quality You use ?
    Yours Bengt W

  • Error -43  when try playback on win7 64bits over the network QT that recide MacPro  osx 10.5 however i can play with VLC player, This happend when the QT is inside a Folder with name longer 8 chars other files has no problem with long names just the QT

    error -43  when try playback on win7 64bits over the network QT that recide MacPro  osx 10.5 however i can play with VLC player, This happend when the QT is inside a Folder with name longer 8 chars other files has no problem with long names just the QT  nfs sharing

    Never mind, I already found the solution myself.
    What I did wrong was:
    - not copying the master image to the nbi folder
    - selecting the netinstall-restore.dmg image as source to copy to my HD.
    The thing is, when you create a netinstall image for 10.5, the image itself is already included in the netinstall image so you don't have to do anything else.
    With the 10.4 image however, you also have to copy the master image to the NetBootSP0 directory.
    In the *.nbi folder contains an netinstall-restore.dmg file. But that is only to boot you to netrestore, it's not the image itself.
    Other alternative is to copy the images to another folder that you share with AFP and adjust the configuration of netrestore like described in this manual:
    http://www.shellharbourd.det.nsw.edu.au/pdf/misc/osxrestoringnet.pdf
    This manual was also how I figured out that I forgot to copy the image to the NetBootSP0 folder.

  • I have problem with my iphone 5 the battery still running so fast

    i have problem with my iphone 5 the battery still running so fast

    Click the link below choose your country then choose service and see if you have an Apple Authorised Service Provider in your country.
    https://locate.apple.com/au/en/
    If you dont have any Apple Authorised Service Providers near you either then contact AppleCare and ask them for options for postage in your country/region. You can find the number for your country below:
    http://support.apple.com/kb/HE57
    Hope this helps

  • A problem with PoE devices in the Topology view (LMS 3.1)

    Hello,
    the customer has a problem with PoE devices in the Topology View. :-( He doesn't see the 2960 PoE devices with the PoE filter enabled in the topology view:-( He uses LMS 3.1 on Windows.
    In the NetPro discussion I found that the list of PoE devices is in the following file:
    POECapableDeviceTypes.properties
    but I cann't to find thid file in the campus directory. In the campus folder are following folders: bin, etc, lib and www.
    Thank you
    Roman

    The file is in NMSROOT/campus/www/classpath/com/cisco/nm/ani/clients/campus/main/filters/POECapableDeviceTypes.properties.

Maybe you are looking for