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.

Similar Messages

  • 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

  • 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 the Finder window in Chrome

    Hello,
    I have a problem with my finder window in Chrome.
    Since the window isn't a separate window anymore, but stuck to the top of the webpage, my finder window is too big. I can't read the "Cancel" or "Send" (I have no idea what's supposed to be there in English but I assume it's something like "send" and "cancel") buttons. I have provided some images of the problem, even if I make the Chrome window as small as possible, the finder window still is too big for my screen. I can resize the finder window from lest to right, but not up or down, which is extremely irritating for me.
    If anyone can help me how I can solve this problem.
    Thanks!

    I found the solution on another thread...Here it is.
    "I was having the same problem.  I found a way to make it smaller.  First, I opened chrome and clicked the green button on the window to make chrome go into full screen.  Then I tried to save a file to make the finder window open in chrome. When it opened in full screen I could see the bottom of the window so I resized it to make it a little smaller.  Once I did this it remembered the size so now I can access the bottom buttons when I take it out of full screen mode. Hope this helps."
    Worked like a charm!

  • I have a problem with the finder

    Hi.
    I have a problem with the finder.
    My girlfriends Macbook (Yosemite 10.10) shows of 6 times in the finder. ?
    I can't find anything on her mac that tells me why this is. ?
    <Image Edited by Host to Remove Personal Information>

    Bugs and Fixes: What's with Yosemite renaming shared computers? | Macworld
    27" i7 iMac (Mid 2011) refurb, OS X Yo (10.10.1), Mavs, ML & SL, G4 450 MP w/10.5 & 9.2.2

  • 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.

  • Problem with eclispe/find update

    Hi,
    My apology if it's not right place to talk about this.
    I get following error when I use Eclipse 3.1 find/update.
    Network connection problems encountered during search.
    Unable to access "http://update.eclipse.org/updates/3.0".
    Unable to access site: "http://update.eclipse.org/updates/3.0" [java.io.IOException]
    Unable to access site: "http://update.eclipse.org/updates/3.0" [java.io.IOException]
    I had this problem at my work then I thought it could be related to proxy setting. But I am having same problem at home as well. I dont have any proxy setting here..it's just connected via wireless network.
    I have tried using 3.1 update site as well by replacing 3.0 by 3.1 in above URL. It's been two days and I am yet to solve the problem.
    Please save me from this misery. :-(
    Thanks,
    Prabhat

    As this is a problem with Eclipse, the Eclipse support options would be the proper place to seek support.
    I found some info on this at https://bugs.eclipse.org/bugs/show_bug.cgi?id=105415 for details. Personally, I'd just update to the latest 3.2 milestone...

  • Problem with the finder

    I have a problem since a month with my finder. It reload every 5 minutes or something like that and it brings the finder to front so in example when i type in a text box in safari, it stops taping and it bring safari to the back and the finder menu bar is replacing it. So everytime i'm transfering a document to my extern hd and the finder is reloaded, it stop transfering and close every finder windows. Do you know what i can do with that? or do i need to go to a applestore and pay a new mac :(?

    Check for incompatible third party applications.
    [One person reports success|http://discussions.apple.com/message.jspa?messageID=8969672#8969672] with installing the latest version of Stuffit upgrade (13.0.3)
    [If using Stuffit, check this one first|http://discussions.apple.com/message.jspa?messageID=8884712#8884712]
    [Finder crashes associated with using Stuffit|http://discussions.apple.com/thread.jspa?threadID=1873700&tstart=0]
    [Finder crashing/looping/closing folders (Stuffit issue)|http://discussions.apple.com/thread.jspa?threadID=1882285&tstart=0]
    [Finder crashes associated with using Afloat|http://discussions.apple.com/message.jspa?messageID=8852780#8852780]
    [Quicktime 7.6 update issues with 3rd party software|http://www.macfixit.com/article.php?story=20090121223437550]

  • Problems with matcher.find()

    Hi,
    Here is what I'm trying to do. Read one (or more later) files...one line at a time and compare it with a regular expresion to extract email addresses.
    Here is my code:
    public final class RegExpressions {
        private static String REGEX;
        private static String INPUT;
        private static BufferedReader br;
        private static Pattern pattern;
        private static Matcher matcher;
        private static boolean found, b;
    public static void main(String[] args) throws Exception {
            initResources();
    private static void initResources() {
           try {         
                      br = new BufferedReader(new FileReader("titleInfo.txt"));
           catch (FileNotFoundException fnfe) {
                System.out.println("Cannot locate input file! "+fnfe.getMessage());
                System.exit(0);
           try {           
                REGEX = "(((\\w)(.)*)+@)";
                INPUT = null ;
                INPUT = br.readLine();
                pattern = Pattern.compile(REGEX);
                while ((INPUT = br.readLine()) != null)
                     // Reset the matcher to begin its next match starting at
                     // the beginning of the newly-read line.
                     matcher.reset(INPUT);
                     matcher = pattern.matcher(INPUT);
                     // Search for a match. A Boolean true value returns if a
                     // match is found.
                     System.out.println("Current INPUT is: "+INPUT);
                     b = matcher.find();
                     System.out.println ("matcher.find() is: " +b);
                     if (matcher.find())
                          System.out.println (INPUT);
           } catch(IOException ioe){}
           catch(PatternSyntaxException pse) {
               System.out.println("There is a problem with the regular expression!");
               System.out.println("The pattern in question is: "+pse.getPattern());
               System.out.println("The description is: "+pse.getDescription());
               System.out.println("The message is: "+pse.getMessage());
               System.out.println("The index is: "+pse.getIndex());
               System.exit(0);
            System.out.println("Current REGEX is: "+REGEX);
            System.out.println("Current INPUT is: "+INPUT);
        }The file I read in looks like this:
    Integration of Scheduling and Replication in Data Grids
    Anirban Chakrti Depak R.A. Shuhis Supta
    Software Engineering and Technology Laboratory
    Something Something Ltd.
    My City, Horse Road
    Bangalore 560 100, India
    Tel: 91 80 852 0261
    Fax: 91 80 852 0740
    {an_chakrti, depak_ra, shuhis_supta }@address.com
    Now what happens is that matcher.find() never finishes executing. Meaning my programs gets stuck at that particular line. I tested with Print statements before and after...etc. Can anyone help me with this problem? Thanks

    the only problem is that some of the emails do not contain the full names. For example if from the text below I extract the email addresses...
    Reckoning Legislative Compliances with Service Oriented Architecture
    � A Proposed Approach1
    Naveen N. Kulkarni K M Senthil Kumar Dr. Srinivas Padmanabhuni
    Software Engineering and Technology Labs, Infosys Technologies Ltd., Bangalore, India.
    {naveen_kulkarni,senthil_km,srinivas_p}@infosys.com
    ....and I'm also able to tokenize them (into naveen and kulkarni for example). How do I use this information to extract the names, which have me mentioned earlier on in the text. The format in which the names are written is not the same. ie it differs from paper to paper. Here is the idea I had....
    it seems that the first part of the email address always exists as it in the full name. If I used that in a regular expression...and went through the text file again trying to match that reg exp...that should work shouldn't it?
    here is my attempt...doesn't work though....any ideas...or an explanation why my code doesn't work?
        private static void extractNames() {
           try {         
                      br = new BufferedReader(new FileReader("titleInfo.txt"));
           catch (FileNotFoundException fnfe) {
                System.out.println("Cannot locate input file! "+fnfe.getMessage());
                System.exit(0);
           try {           
                for (int i=0; i<emails.length;i++){
                     int index = emails.indexOf("_");
              if (emails[i].indexOf("_") != -1){
                   StringBuffer firstName = new StringBuffer(temp.substring(0,index));
                   REGEX = "((.)[ ])*"+firstName+"((.)[ ])";
              pattern = Pattern.compile(REGEX); // I get a null pointer exception on this line...?
         while ((INPUT = br.readLine()) != null )
                   matcher = pattern.matcher(INPUT);
              System.out.println("Current INPUT is: "+INPUT);
              System.out.println ("Matche found? " +b);
              if (matcher.find()){
                   System.out.println (INPUT);
                   System.exit(0);
    } catch(IOException ioe){}
    catch(PatternSyntaxException pse) {
    System.out.println("There is a problem with the regular expression!");
    System.out.println("The pattern in question is: "+pse.getPattern());
    System.out.println("The description is: "+pse.getDescription());
    System.out.println("The message is: "+pse.getMessage());
    System.out.println("The index is: "+pse.getIndex());
    System.exit(0);
    System.out.println("Current REGEX is: "+REGEX);
    System.out.println("Current INPUT is: "+INPUT);
    Thanks!

  • Problem with "Remove find my iphone"

    Somone stole my iphone 4s and I used the remote procedure "find my iphone" but the device appeared offline. In any case, if it were connected to the internet I would come back a signal. The problem is that then I accidentally clicked "remove find my iphone" and therefore there aren't any more device, so I think that the thieves could use the device with no problem. There is no way to undo this?
    Ilaria

    ylaryna11 wrote:
    Somone stole my iphone 4s and I used the remote procedure "find my iphone" but the device appeared offline. In any case, if it were connected to the internet I would come back a signal. The problem is that then I accidentally clicked "remove find my iphone" and therefore there aren't any more device, so I think that the thieves could use the device with no problem. There is no way to undo this?
    No, you cannot undo it.

  • Having Problems with Location finder

    Since 4.0 update my location finder does not work on home network. Tried it on a public network and it works. Anybody else had this problem and did you find a solution.

    Many people (myself included) noticed that Location Services stopped working with the upgrade to iOS 4.0. The symptom is that Maps and other apps say "Your location could not be determined." even in areas that used to work. The problem is that starting in iOS 3.2 and iOS 4.0, Apple switched from using the SkyHook location database to using their own. Whereas the SkyHook database had the ability for users to add their own WiFi access points, Apple does not have anyway for us to do that.
    I just spent over an hour on the phone with Apple Support senior advisors, who initially wanted to restore my unit or even replace it (neither of which would have fixed it), until I found the news reports about Apples new location database. Eventually, I found a senior advisor who was able to track down the problem and admitted that, yes, since the switch from SkyHook to Apple's own database, many WiFi access points no longer work with location services. "Apple is working on the problem, and eventually it will be fixed, although there isn't any time estimate." I asked specifically if this meant that Apple was going to allow users to add their own WiFi access points, and she said "Yes."

  • Problem with the Finder when copying stuff on a server

    Hi all !
    I have a NAS at home and since a few days, copying stuff on its hard drive has become a pain.
    The hard drives connected to the NAS mount well with no problem, and when I start copying a big file on them, The finder sort of freezes, becomes completely unresponsive.
    The console gives me informations like these :
    25/02/13 20:55:46,479 sandboxd[373]: ([356]) com.apple.qtkits(356) deny system-fsctl 0x7a13
    25/02/13 20:55:46,500 sandboxd[373]: ([356]) com.apple.qtkits(356) deny system-fsctl 0x7a13
    25/02/13 20:55:46,520 sandboxd[373]: ([356]) com.apple.qtkits(356) deny system-fsctl 0x7a13
    25/02/13 20:55:46,541 sandboxd[373]: ([356]) com.apple.qtkits(356) deny system-fsctl 0x7a13
    25/02/13 20:55:46,563 sandboxd[373]: ([356]) com.apple.qtkits(356) deny system-fsctl 0x7a13
    25/02/13 20:55:46,583 sandboxd[373]: ([356]) com.apple.qtkits(356) deny system-fsctl 0x7a13
    25/02/13 20:55:50,330 Locum[377]: Connection with distnoted server was invalidated
    25/02/13 20:55:51,308 com.apple.qtkitserver[356]: Failed to get user access for mount /Volumes/Disque dur
    25/02/13 20:55:51,312 com.apple.qtkitserver[356]: Failed to get user access for mount /Volumes/Disque dur
    25/02/13 20:55:51,316 com.apple.qtkitserver[356]: Failed to get user access for mount /Volumes/Disque dur
    25/02/13 20:55:51,422 sandboxd[373]: ([356]) com.apple.qtkits(356) deny system-fsctl 0x7a13
    25/02/13 20:55:51,442 sandboxd[373]: ([356]) com.apple.qtkits(356) deny system-fsctl 0x7a13
    25/02/13 20:55:51,463 sandboxd[373]: ([356]) com.apple.qtkits(356) deny system-fsctl 0x7a13
    25/02/13 20:56:08,589 Locum[378]: Connection with distnoted server was invalidated
    25/02/13 20:56:12,117 WindowServer[89]: CGXDisableUpdate: UI updates were forcibly disabled by application "Finder" for over 1.00 seconds. Server has re-enabled them.
    25/02/13 20:56:14,713 com.apple.usbmuxd[54]: _heartbeat_failed heartbeat detected detach for device 0x3-192.168.0.6:0!
    25/02/13 20:56:26,117 WindowServer[89]: disable_update_likely_unbalanced: UI updates still disabled by application "Finder" after 15.00 seconds (server forcibly re-enabled them after 1.00 seconds). Likely an unbalanced disableUpdate call.
    25/02/13 20:56:36,000 kernel[0]: utun_ctl_connect: creating interface utun0
    I have reformated the hard drive of the NAS, and its configuration is OK.
    On the mac, I have tried everything : Zapping the PRAM, repair authorisations, except reinstall the system. That i really dont want to have to do at the moment.
    So can anyone help with this ?
    Best regards,
    Phil.

    Exact same situation going on here. 
    Connecting to a NAS (DroboFS).  Started happening a few weeks ago.  I'm looking at a 1.19gb copy right now over a hardwired ethernet connection.  8.4 megs copied so far in 45 minutes. 
    os 10.8.4 Macbook Pro.
    Have tried SMB, AFP, using IP address, aliases, etc.  No noticiable difference.
    Used to be lighting fast, connection looks good, 1000T,... network speed tests look good, have looked at ip problems, everything looks good and nothing on my network changed.
    Only message in the system logs of relevance to the copy are:
    MacBook-Pro.local Locum[466]: Connection with distnoted server was invalidated
    MacBook-Pro.local WebProcess[467]: objc[467]: Object 0x7f9ebbc1c6c0 of class NSUserDefaults autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug

  • Adobe PostScript 3 problem with 'search' & 'find'?

    We have a new Ricoh copier with Adobe PostScript 3 installed. When we scan a document as a .pdf and send it to an email address, the receiver gets it, opens it ok, but then can't 'search' or find' or copy anywhere on the document.  What is the problem?  Is it the Adobe PostScript 3 software? 
    Please help, as we need to get these documents to 'search', 'find,' and  copy.
    carol forbes, j.d.

    Yes, we know now that the .pdf is a picture image, but how do we correct it?  We've been told it needs OCR (optical Character Recognition), but isn't that included in the software of Adobe PostScript 3?  Please advise.
    Thanks, Carol
    Duval County Law Library
    501 West Adams Street, Rm 2291
    Jacksonville, FL 32202
    Ph:  (904) 255-1150
    Fax: (904) 255-1164

  • Problem with QuickLook/Finder and Office 2008 Files...

    Hello,
    I don't understand what's going on with QuickLook and Finder. I used Keynote and the created files were readable with Quicklook and previewable in the Finder.
    Lately, I installed MacOffice 2008. I opened the keynote files with Powerpoint, save it in the same format....and the files are now unpreviewable in Finder and unreadable with Quicklook....I tried to save it in pptx format but I've the same problem....Is it possible to make this files readable and previewable ?
    Thanks,
    RedVivi

    Solved with 10.5.2 update

  • Problem with Search / Find in Files ... in Version 10.1.3.1.0?

    When i use the function Search / Find in Files ... about the Active Application the IDE will be frozen and the JDeveloper hangs and must be killed. Is this a bug or is this only my problem?

    I had a similar problem a while ago.
    It would hang on 'indexing...'
    I think the problem was that i had a package that was called exactly the same as my project.
    For example:
    Projectname: util
    Package: com.example.util
    The problem disappeared when i renamed the project.
    I never came around checking if that was the real problem tough, so i could be completly wrong.
    Regards

Maybe you are looking for