Can somebody please help me creating a GREP style to reformat all the website adresses in my layout?

i've got this text from a client full with webadresses, some end with .com or .nl and i would like to highlight these adressess in bold and blue... i created a textstyle for it but the only thing i manage to get as a result is only the beginning of the website 'www.' i know it's possible but my skills are lacking in this departement...
can anyone help me getting started...?

Got it.
parentheses group #1 (the first | separated OR group): DOS path name, because a link can also refer to a file.
parentheses groups #2-5 (2nd OR group): e-mail address. Note: a "mailto://" prefix does not get matched here.
parentheses groups #6-13 (3rd OR group): URL, with a mandatory prefix "http://", "https://", "ftp://", and some more ("smb://", for example, is a Samba server file prefix). This also includes "ftps://", which was unknown to me but it appears it's perfectly valid.
It does not match the "mailto://" prefix for an e-mail address, but that's a moot point because the URL may not contain a @ character anyway.
This group correctly recognizes URLs that contain one or more hyphens in the base name (it also correctly rejects hyphens in the domain extension).
parentheses groups #14-15: (4th and last OR group): any non-prefixed URL, recognized solely on the basis of "any sequence of word characters, including the hyphen, followed by a period, optionally followed by some more characters (including both period and forward slash but excluding the hyphen), followed by at least two uppercase or lowercase letters.
This last one is responsible for (a) recognizing both "deadline.com" and "keefe-studios.com" as URLs, but (b) also rejecting "www.test-test.com" -- a hyphen in the 'center', fully optional, part.
Interestingly, there are more differences between the more exact 'match only with prefix' and the catch-all 'match about anything'. The former includes among the allowed characters: ':' (which, if I recall correctly, is only valid if a port number follows!), '#', '$', '%', '&', '?' and '+', so it matches a server query as well:
http://www.google.com/search?hl=enl&tbo=d&site=&source=hp&q=allowed+characters+in+url&oq=a llowed+characters+in+url
The latter does not include all of these characters, just letters, numbers, the hyphen (but not in all positions), and a period. It's probably because this is an unreliable way to match URLs after all -- hence the number of 'false hits'. These would only increase with even more allowed characters.
Lesson learned: to be assured "Create Hyperlinks Automatically" works as expected, make sure URLs are prefixed with "http://", and mail addresses are not prefixed with "mailto://". I didn't test if the function actually creates a correct e-mail link, but even if it does the prefix is not included in the clickable linked text.
(Also interestingly, it appears a GREP style, fed with this same query, doesn't stumble over the hyphen whereas a GREP find does. I don't think I'm capable of figuring that one out.)

Similar Messages

  • I need some help with my java game using applets, CAN SOMEBODY PLEASE HELP

    Hi,
    I am in the process of creating a RPG program using Java. I am not very experienced with java, however the problem i am currently facing is something i can't seem to figure out. I would like to draw a simple grid where a character (indicated by a filled circle) moves around this grid collecting items (indicated by a red rectangle). When the character moves on top of the grid with the item, i would like it to disappear. Right now i am not worrying about the fact that the item will reappear after the character moves away again, because sometimes, when the character moves over the item, nothing happens/another item disappears. i have been at this for 4 days and still cannot figure out what is goign on. can somebody please help me? it would be most appreciated.
    Thanks
    PS if i needed to send you my code, how do i do it?

    Thank you for replying.
    The thing is, I am taking java as a course, and it is necessary for me to start off this way (this is for my summative evaluation). i agree with you on the fact, however, that i should go in small steps. i have been doing that until this point, and my frustration caused me to jump around randomly for an answer. I also think that it may just be a bug, but i have no clue as to how to fix it, as i need to show my teacher at least a part of what i was doing by sometime next week. Here is my code for anybody willing to go through it:
    // The "Keys3" class.
    import java.applet.*;
    import java.awt.*;
    import java.awt.Event;
    import java.awt.Font;
    import java.awt.Color;
    import java.applet.AudioClip;
    public class Keys3 extends java.applet.Applet
        char currkey;
        int currx, curry, yint, xint;
        int itmval [] = new int [5],
            locval [] = new int [5],
            tempx [] = new int [5], tempy [] = new int [5],
            tot = 0, score = 0;
        boolean check = true;
        AudioClip bgSound, bgSound2;
        AudioClip hit;
        private Image offscreenImage;
        private Graphics offscreen;     //initializing variables for double buffering
        public void init ()  //DONE
            bgSound = getAudioClip (getCodeBase (), "sound2_works.au");
            hit = getAudioClip (getCodeBase (), "ah_works.au");
            if (bgSound != null)
                bgSound.loop ();
            currx = 162;
            curry = 68;
            setBackground (Color.white);
            for (int count = 0 ; count < 5 ; count++)
                itmval [count] = (int) (Math.random () * 5) + 1;
                locval [count] = (int) (Math.random () * 25) + 1;
            requestFocus ();
        public void paint (Graphics g)  //DONE
            resize (350, 270);
            drawgrid (g);
            if (check = true)
                pickitems (g);
                drawitems (g);
            g.setColor (Color.darkGray);
            g.fillOval (currx, curry, 25, 25);
            if (currkey != 0)
                g.setColor (Color.darkGray);
                g.fillOval (currx, curry, 25, 25);
            if (collcheck () != true)
                collision (g);
            else
                drawitems (g);
        } // paint method
        public void update (Graphics g)  //uses the double buffering method to overwrite the original
                                         //screen with another copy to reduce flickering
            if (offscreenImage == null)
                offscreenImage = createImage (this.getSize ().width, this.getSize ().height);
                offscreen = offscreenImage.getGraphics ();
            } //what to do if there is no offscreenImage copy of the original screen
            //draws the backgroudn colour of the offscreen
            offscreen.setColor (getBackground ());
            offscreen.fillRect (0, 0, this.getSize ().width, this.getSize ().height);
            //draws the foreground colour of the offscreen
            offscreen.setColor (getForeground ());
            paint (offscreen);
            //draws the offscreen image onto the main screen
            g.drawImage (offscreenImage, 0, 0, this);
        public boolean keyDown (Event evt, int key)  //DONE
            switch (key)
                case Event.DOWN:
                    curry += 46;
                    if (curry >= 252)
                        curry -= 46;
                        if (hit != null)
                            hit.play ();
                    break;
                case Event.UP:
                    curry -= 46;
                    if (curry <= 0)
                        curry += 46;
                        if (hit != null)
                            hit.play ();
                    break;
                case Event.LEFT:
                    currx -= 66;
                    if (currx <= 0)
                        currx += 66;
                        if (hit != null)
                            hit.play ();
                    break;
                case Event.RIGHT:
                    currx += 66;
                    if (currx >= 360)
                        currx -= 66;
                        if (hit != null)
                            hit.play ();
                    break;
                default:
                    currkey = (char) key;
            repaint ();
            return true;
        public boolean collcheck ()  //DONE
            if (((currx == tempx [0]) && (curry == tempy [0])) || ((currx == tempx [1]) && (curry == tempy [1])) || ((currx == tempx [2]) && (curry == tempy [2])) || ((currx == tempx [3]) && (curry == tempy [3])) || ((currx == tempx [4]) && (curry == tempy [4])))
                return false;
            else
                return true;
        public void collision (Graphics g)
            drawgrid (g);
            for (int count = 0 ; count < 5 ; count++)
                if ((currx == tempx [count]) && (curry == tempy [count]))
                    g.setColor (Color.darkGray);
                    g.fillOval (currx, curry, 25, 25);
                else if ((currx != tempx [count]) && (curry != tempy [count]))
                    g.setColor (Color.red);
                    g.fillRect (tempx [count], tempy [count], 25, 25);
        public void drawitems (Graphics g)
            for (int count = 0 ; count < 5 ; count++)
                g.setColor (Color.red);
                g.fillRect (tempx [count], tempy [count], 25, 25);
        public void pickitems (Graphics g)
            check = false;
            for (int count = 0 ; count < 5 ; count++)
                if (locval [count] <= 5)
                    tempy [count] = 22;
                else if (locval [count] <= 10)
                    tempy [count] = 68;
                else if (locval [count] <= 15)
                    tempy [count] = 114;
                else if (locval [count] <= 20)
                    tempy [count] = 160;
                else if (locval [count] <= 25)
                    tempy [count] = 206; //this determines the y-position of the item to be placed
                if (locval [count] % 5 == 0)
                    tempx [count] = 294;
                else if ((locval [count] == 1) || (locval [count] == 6) || (locval [count] == 11) || (locval [count] == 16) || (locval [count] == 21))
                    tempx [count] = 30;
                else if ((locval [count] == 2) || (locval [count] == 7) || (locval [count] == 12) || (locval [count] == 17) || (locval [count] == 22))
                    tempx [count] = 96;
                else if ((locval [count] == 3) || (locval [count] == 8) || (locval [count] == 13) || (locval [count] == 18) || (locval [count] == 23))
                    tempx [count] = 162;
                else if ((locval [count] == 4) || (locval [count] == 9) || (locval [count] == 14) || (locval [count] == 19) || (locval [count] == 24))
                    tempx [count] = 228;
        public void drawgrid (Graphics g)  //DONE
            g.drawRect (10, 10, 330, 230); //draws the outer rectangular border
            int wi = 10; //width of one square on the board
            int hi = 10; //height of one square on the board
            for (int height = 1 ; height <= 5 ; height++)
                for (int row = 1 ; row <= 5 ; row++)
                    if (((height % 2 == 1) && (row % 2 == 1)) || ((height % 2 == 0) && (row % 2 == 0)))
                        g.setColor (Color.gray);
                        g.fillRect (wi, hi, 66, 46);
                    else /*if (((height % 2 == 0) && (row % 2 == 1)) || ((height % 2 == 0) && (row % 2 == 0)))*/
                        g.setColor (Color.lightGray);
                        g.drawRect (wi, hi, 66, 46);
                        g.setColor (Color.lightGray);
                        g.drawRect (wi, hi, 66, 46); //drawn twice to make a shadow effect
                    wi += 66;
                wi = 10;
                hi += 46;
            } //this draws the basic outline of the game screen
    } // Keys3 class

  • I want to uninstall the new iOS update. can somebody please help?

    I have a son that is disabled and he LOVES youtube. He has learned a lot navigating through the app. The new iOS update does not support that app. Why?? i dont know but I wish I never updated. I have no idea how to uninstall the update. Can somebody PLEASE help me??!!! Thank you so much!!

    Just go to YouTube.com in safari and view the content that way. Create a shortcut on the home screen so you do not bleed to type in the address.

  • HT204053 Need A Solution With An iCloud Problem So Can Somebody Please Help Me?

    Can somebody please help me find a solution to my problem? 
    When I enter my username and password and hit enter I get this message, "The Apple ID is valid but is not an iCloud account" is the error message I receive implying that I do not have an iCloud account. I have searched and looked at the troubleshooting contents and I haven't found anything even close to this issue so I have come here for help. I appreciate any tips or tricks to fix my problem.    Thank you for reading and look forward to hearing your answers. 
    Thank You,
    Lisa W. 

    Hey Lisa_AW!
    If you want to make this Apple ID an iCloud account, try referencing the information here:
    Creating an iCloud account: Frequently Asked Questions
    http://support.apple.com/kb/ht4436
    Thanks for using the Apple Support Communities. Have a good one!
    -Braden

  • When i open iphoto i see my photo's for 1 second and then they are gone .The photo's are still there but i can see them only on the bottom or top of my screen when i try to open them i get a sign that it is not possible.Can somebody please  help me?

    when i open iphoto i see my photo's for 1 second and then they are gone .The photo's are still there but i can see them only on the bottom or top of my screen when i try to open them i get a sign that it is not possible.Can somebody please  help me?

    Have you upgraded to iPhoto 9.6 for compatibility with Yosemite? If not, try that first.
    It looks like iPhoto has lost the connection between the thumbnails and the original image files.
    This can be caused by a corrupted iPhoto library, or the originals have been deleted or moved.
    Try first to rebuild your iPhoto Library:
    If you do not have a current backup of the iPhoto library, make a copy of the library, but do not overwrite any previous backup.
    Launch iPhoto with the ⌥⌘-key combination (option-command) held down.
    Select "rebuild" from the first aid panel.  This may take a while for a large library.
    Can you now see your photos again?
    If not, rebuild the library with iPhoto Library manager as described by Old Toad:            Re: iphoto crashed

  • I am unable to update, uninstall, or reinstall iTunes on my laptop.  Windows 7 Ultimate 32 bits.  Error code is 2330.  Can somebody please help me?

    I am unable to update, uninstall, or reinstall iTunes on my laptop.  Everything was working fine until recently when there was an update available for iTunes, and when I tried to update this, I got the message, "The installer has encountered an unexpected error installing this package.  This may indicate a problem with this package. Error code is 2330."  Can somebody please help me?
    System configuration:
    Windows 7 Ultimate 32 bits.
    Version:  6.1.7601 Service Pack 1 Build 7601
    System Directory:  C:\Windows\system32
    RAM:  1.00 GB.

    For general advice see Troubleshooting issues with iTunes for Windows updates.
    The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down the page in case one of them applies.
    The further information area has direct links to the current and recent builds in case you have problems downloading, need to revert to an older version or want to try the iTunes for Windows (64-bit - for older video cards) release as a workaround for installation or performance issues, or compatibility with QuickTime or third party software.
    Your library should be unaffected by these steps but there are also links to backup and recovery advice should it be needed.
    tt2

  • I just want to know that if I buy an iphone 4S here in melbourne can i use it in china? i don`t know whether it`s locked or not and i don`t know what`s the network in china as well. Can somebody please help?I am really in a hurry to know it. Thanks a lot.

    I just want to know that if I buy an iphone 4S here in melbourne can i use it in china?
    i don`t know whether it`s locked or not and i don`t know what`s the network in china as well.
    Can somebody please help?
    I am really in a hurry to know it.
    Thanks a lot.
    P.S: For the iphone 4S. is there any difference for the one from online shop or the actual store?

    iPhones purchased from the online Apple Store in Australia will be unlocked. To the best of my knowledge, unlocked iPhone are not available from the physical Apple Stores at this time, though you can call the Apple Store in Melbourne and inquire.
    Note that the warranty on iPhones is not international, so if you purchase an iPhone in Australia and it needs service, you would have to ship the iPhone to someone in Australia to take or send to Apple for service and then ship it back to you.
    Regards.
    (Note for any readers: this is an old thread and I posted before noticing the date, but decided to leave my reply in case anyone else finds the thread and has the same question).

  • HT4211 I'm not able to download apps from App Store. It never downloads and it shows waiting status.can somebody please help me resolve this issue

    I'm not able to download apps from App Store. It never downloads and it shows waiting status.can somebody please help me resolve this issue

    I really do not think it is the iPad or your network connection. Other users have reported this very same issue. Try this and see if it works for you - it may not work - but it's easy to try - harmless - and it has worked in the past for others.
    Try signing out of your account and restart your iPad.
    Go to Settings>Store>Apple ID and tap the ID and sign out. Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button. Go back to Settings>Store> Apple ID and sign in again.

  • Hi can somebody please help me to get Apple phone support stop calling me to tell me that i NOT awnsering the phone!!!!

    Hi can somebody please help me to get Apple phone support stop calling me to tell me that i NOT awnsering the phone!!!!

    The battery capacity on a 5S is a little better but be sure to read the special notes on conserving battery power on these phones.   Here are two in particular.
    17 Tips to Extend iPhone Battery Life (Updated for iOS 7)
    How to improve iPhone battery life, what to do if your iPhone battery is running low - How to - Macworld UK
    Regards,  71

  • I have a ram problem, can somebody please help me?

    Hello
    This is the first time I've put a computer together from scratch (I got some help from a friend though). What I wonder is if there is a manual for the MSI mothercards somewhere on the net because I didn't get any good description  in the package, and I can't find the spot for audi and USB inputs. I also would like to know how many memorysticks i can use, because if i put in 3 of them the computer starts to beep. Can somebody please help me?
    My specs are:
    Q-tec midi Tower
    MSI K8N Neo2-FX, nForce3
    AMD Athlon 64 3200+ 2.0GHz socket 939
    Zalman P4 CNPS-7700-CU
    XFX Geforce FX5500 128MB DDR
    Samsung Spinpoint P120 200GB
    Sony DVD burner DL
    Sony floppydisk
    Cosair Value S. PC3200 DDR-dimm 512MB unbuffered non-Parity, 64Meg x 64, CL2.5
    (I have 3 of these but I can only have 2 at a time or the computer wont work)
    // TheGamecritic

    Quote from: TheGamecritic on 15-September-05, 18:42:56
    Hello
    This is the first time I've put a computer together from scratch (I got some help from a friend though). What I wonder is if there is a manual for the MSI mothercards somewhere on the net because I didn't get any good description  in the package, and I can't find the spot for audi and USB inputs. I also would like to know how many memorysticks i can use, because if i put in 3 of them the computer starts to beep. Can somebody please help me? 
    My specs are:
    Q-tec midi Tower
    MSI K8N Neo2-FX, nForce3
    AMD Athlon 64 3200+ 2.0GHz socket 939
    Zalman P4 CNPS-7700-CU
    XFX Geforce FX5500 128MB DDR
    Samsung Spinpoint P120 200GB
    Sony DVD burner DL
    Sony floppydisk
    Cosair Value S. PC3200 DDR-dimm 512MB unbuffered non-Parity, 64Meg x 64, CL2.5
    (I have 3 of these but I can only have 2 at a time or the computer wont work)
    // TheGamecritic
    Congrats on 'Rolling your Own' for the first time.  I'm certainly no expert although I have sucessfully built a few.  Actually, my specs are almost identical except I'm using Kingston Value Ram instead of Cosair.  As far as your first question, I assume you mean the internal USB/MB connectors and the MB audio connector(s).  The information is in the MSI Neo2 Plat manual although you have to look closely and move back and forth between the MB schemaic and the section(s) describing the connections to get a clear fix.  The MB USB connectors are on the side of the MB furthest from the RAM slots and about in the center, (JUSB1 or JUSB2).  The audio connector (JAUD1 is located on the same side of the MB as the USB connectors only near the rear panel end, (close to the orange PCI slot).  As you, I found that that I could not use three ram sticks as I could in my old K7 board and when I bought two sets of matched ram I found that it didn't like 4 sticks either.  Three:  Would'nt post  Four:  Instability and an initial  hit in performance;  although I was able to finally coax it to 200mhz Dual Channel it wasn't worth it because of the random crashes n Windows I was getting. I have also discovered the hard way that for some reason my board at least is hypersensitive to IDE  cables, (Would not recognize any secondary IDE device on Channel 1 until I found the right cable) and it does not like Sound Blaster audio cards prior to Audigy 2 ZS.  Actually, it only tolerates a ZS and I had problems and it didn't like my new X-Fi at all until I moved it to the PCI slot closest to my video card.  I was getting random BSODS and crashes, (one that took out my OS).  Since I move the card things appear to be more stable, so far.  Anyway good luck.

  • I'm having trouble with my macbook pro, I have only had it for three months, when I plugged a camera sd card into the sd slot it isn't appearing anywhere on the computer and i can not access my photographs. can somebody please help me?

    I'm having trouble with my macbook pro, I have only had it for three months, when I plugged a camera sd card into the sd slot it isn't appearing anywhere on the computer and i can not access my photographs. can somebody please help me?

    Shootist007 wrote:
    Clifton I must disagree with you on the above statement. It is my opinion and experience that you should never connect the camera directly to any computer, Mac Windows Whatever.
    It is always best to Remove the memory card from the camera and put it in a card reader, whether an external reader or one built into the computer, to copy images from the card.
    Hi Shootist. I would be interested in hearing some reasoning on this. I almost always use a USB cable to connect my camera to the MBP for transferring pictures, and have moved about 30,000 this way over the last 6 years since my photography went digital. Recently, on the rare occassions when I have only a few to transfer and I was too lazy to go for the cable, I have used the card reader; about half those times I have difficulty getting the MBP to recognise the card. I find I have to press the card very hard into the slot for it to be recognised.
    My rationale is quite possibly wrong, but I feel that the USB connectors are more robust and hard-wearing than the flimsy connectors on an SD card. Also, I haven't measured it, but I think the data transfer is faster with the cable. (I just came across this test, which reports noticeably faster transfer for cable than built-in card reader, but the computer was a PC)
    Chiara, sorry for hijacking your thread.

  • Can somebody please help-..with page ITEM

    Can somebody please help…..
    I have an Item named P11_FLAG on Page 11 of my application. I want to reference or access the value of this Item in all the pages of my application. I have tried several options but it seems not to work. I will really appreciate your help on this regard.
    Thank you

    referencing from other pages in code, use :P11_FLAG or external packages you can use the function v('P11_FLAG') or in substitution situations like referring to it in a report title &P11_FLAG. (note the last full stop).
    Phil

  • Can somebody please tell me what 'genius' included 'family' in reminders, and, made it so i cannot remove it.  I have NO family, and, i find this particularly hurtful and disrespectful.  Can somebody please help me remove it.

    Can somebody please tell me what 'genius' included 'family' in reminders, and, made it so i cannot remove it.  I have NO family, and, i find this particularly hurtful and disrespectful.  Can somebody please help me remove it.

    Hi EmmeElle,
    Is it an iCloud reminder or a third party reminder like from an Exchange account(maybe your company provides this service together with mail etc..).
    In the first case you should definitely be able to delete it by right click->delete or via https://www.icloud.com
    In the second case there might be a browser based settings page from your company or the provider of the service (i.e. Exchange) itself. Otherwise you can go to your System Preferences -> Internet Accounts and deactivate reminders for this account. WARNING: this also deletes all other reminder lists and reminders from this service on your mac.
    jl

  • I set up my email account with ntlworld can somebody please help me why it keeps downloading emails i have deleted from about 4 years ago amounting to thousands of emails. thanks

    i set up my email account with ntlworld can somebody please help me why it keeps downloading emails i have deleted from about 4 years ago amounting to thousands of emails. thanks

    Hi, is this POP or IMAP?
    In Mail Preferences>Accounts>Mailbox Behaviors, what are settings for remove from server & such?

  • I just exchanged a faulty iPhone 4 for a new one, when I got home to restore it, iCloud says "cannot restore backup". Can somebody please help provide much needed advice? Thanks in advance!

    I just exchanged a faulty iPhone 4 for a new one, when I got home to restore it, iCloud says "cannot restore backup". Can somebody please help provide much needed advice? Thanks in advance!

    Yep, that's the only message that popped out. Nothing else. Yes, it's running on the latest ios and I still can't restore it. I called apple and they told me it's probably something wrong with their servers. Anyway thanks for the advice.

Maybe you are looking for

  • 10.7 Update not working?

    I updated  my iTunes from 10.6 to 10.7 and now when I click my desktop or start menu shortcut it says 'The item 'iTunes.exe' that this short cut refers to has been changed or moved, so this shortcut will no longer work properly'. I have tried repairi

  • Photoshop CS6 won't update: "Adobe Photoshop 13.0.6 Installation failed. Error Code: U44M2P7"

    Photoshop CS6 won't update: "Adobe Photoshop 13.0.6 Installation failed. Error Code: U44M2P7"

  • Cloning a PBS Sales Order with BAPI FM?

    Hi, I would like to create a new sales order with data stored stored already inside the PBS online archive. I thought of 'simply' using a function module but haven't found any suitable yet. Of course there is always a manually way - read all necessar

  • RadioButton event handler problem!!

    I have 2 arrays of radiobuttons, lRB[] and corresponding to that array zRB[][], ie when lRB[1] is clicked zRB[1][] should be displayed. Every other part of the program was working fine until I added the following piece of code! I can't see why it sho

  • F4v playback

    Hi, I'm recording a stream from a webcam as an f4v file using FMS 3.5.  The file is created in the live folder, and i can stream it back to the client no problem, however when I try to play the file in Adobe Media Player (or anything else) it won't p