Help with basic regex

Hello,
In need to create a regex to find all the urls that contains the directory /nl_BE/
Thx in adv,
Pieter Pareit

That's true. But he asked for regex, so I gave him
regex. ;-)I already told Questie yestreday: what people ask for and what they want is usually not the same thing. :)
Edit: How are you, your Majesty?Call me Rene, thanks. I stepped down in the Queen's favour long ago. :)
BTW, I don't think I heard the end of that little
travesty with the Queen (from about 6 months ago I
think it was). I hope she turned up safe and sound.She was here briefly in January. Last I heard from her (a few weeks ago), she was doing well.

Similar Messages

  • Need help with basic program.....!

    I've to write a program that generates a random number, which the user has to try and guess, after each guess they're told whether it's too high or too low etc., I've gotten this far, however, the user has only 10 guesses.... In my program I've used a while loop and the user gets an infinite number of guesses, I know I'm supposed to use a for loop, but can't seem to get it to work properly. Also, when the user guesses the number, the program then has to print out how many guesses it took, and I have no idea how to get it to do this AT ALL!!! I'd really appreciate some help with this, thanks v. much!!!!

    I've to write a program that generates a random
    number, which the user has to try and guess, after
    each guess they're told whether it's too high or too
    low etc., I've gotten this far, however, the user has
    only 10 guesses.... In my program I've used a while
    loop and the user gets an infinite number of guesses,
    I know I'm supposed to use a for loop, but can't seem
    to get it to work properly. Also, when the user
    guesses the number, the program then has to print out
    how many guesses it took, and I have no idea how to
    get it to do this AT ALL!!! I'd really appreciate some
    help with this, thanks v. much!!!!Hey not every book covers every aspect of Java (if you haven't got a book and don't want to buy 1 i recommend an online tutorial) If u want the user to have an infinate number of guesses, use an infinate while loop. Put this in a file called app.java:
    import java.applet.Applet;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class app extends Applet implements ActionListener
         JLabel lbl=new JLabel("Guess a number between 0 and 10:");
         JTextField txtfield=new JTextField(20);
         JButton button=new JButton("Guess...");
         JLabel lbl2=new JLabel();
         int randomnumber=Math.round((float)Math.random()*10);
         public void init()
              add(lbl);
              add(txtfield);
              add(button);
              button.addActionListener(this);
         public void actionPerformed (ActionEvent e)
              String s=new String("");
              s+=randomnumber;
              if (e.getSource().equals(button) && txtfield.getText().equals(s))
                   setBackground(Color.white);
                   setForeground(Color.black);
                   lbl2.setText("Got it!");
                   add(lbl2);
                   validate();
              else
                   setBackground(Color.white);
                   setForeground(Color.black);
                   if (Integer.parseInt(txtfield.getText())>randomnumber)
                   lbl2.setText("Too High!");
                   else
                   lbl2.setText("Too Low!");
                   add(lbl2);
                   validate();
    Then create a HTML document in the classes folder:
    <HTML>
    <HEAD>
    <TITLE>APPLET</TITLE>
    </HEAD>
    <BODY>
    <HR>
    <CENTER>
    <APPLET
         CODE=app.class
         WIDTH=400
         HEIGHT=200 >
    </APPLET>
    </CENTER>
    <HR>
    </BODY>
    </HTML>
    It will do what you wish. If you want to have more then 10 numbers to guess, for example 100, do this:
    int randomnumber=Math.round((float)Math.random()*100);
    Does that answer your question?

  • New to Photoshop (CS4Ext) and need help with basic loading of images to new folder.

    Just purchased CS4Ext and installed it. It's not showing up on my desktop as a quick entry icon. I want to simply load images from a portable hard drive (USB) to a new folder in photoshop so I can review them and begin to select  and separate out some of interest to manipulate  and share or get ready to print. It 's the most basic help one can need butI'm jut not clear on the workflow steps . Would appreciate someone walking me through the steps .
    Thanks much

    drmjp2 wrote:
    Just purchased CS4Ext and installed it. It's not showing up on my desktop as a quick entry icon.
    Let's see…   First of all, this is the Photoshop Macintosh forum.  Installed applications never, ever show up on your desktop as a "quick entry" icon on a Mac.  Are you on a Windows PC maybe?
    drmjp2 wrote:
    I want to simply load images from a portable hard drive (USB) to a new folder in photoshop so I can review them and begin to select  and separate out some of interest to manipulate  and share or get ready to print.
    Just select them with your mouse in the Finder and drag-copy them into the new folder.  Done.

  • Need Help With Basics of SQL

    Hey I'm trying to get a working understanding of some of the basics behind SQL, I've composed a few questions that I think may help me with this. Anyone that can help me with any of them will greatly help me thanks.
    1. How to create synonym for tables?
    2. How to describe the structure of tables?
    3. How to list the contents of tables?
    4. How to create a table named with the same structure as another table?
    5. How to copy rows with less than a certain criteria in value (e.g. Price<$5.00) into another table?
    6. How to change the data type to e.g. NUMBER(6)?
    7. How to add a new column named with data type e.g. VARCHAR2(10)?
    8. How to change a specific field within a table (e.g. For ORDER_NUMBER 12489, change the C_NUMBER to 315)?
    9. How to delete a specific row from a table?
    10. How to declare a column as the primary key of a table and call it e.g. PK_something?
    11. How to show certain columns when another column is less than a certain criteria in value (e.g. Price<$5.00)?
    12. How to show certain columns with another column having a certain item class e.g. HW or AP?
    13. How to list certain columns when another column e.g. price is between two values?
    14. How to list certain columns when another column e.g. price is negative?
    15. How to use the IN operator to find certain columns (e.g. first and last name of customers who are serviced by a certain ID)
    16. How to find certain columns when one of the columns begins with a particular letter (e.g. A)
    18. How to list the contents of the a table sorted in ascending order of item class and, within each item class, sorted in descending order of e.g. price?
    19. How to do a count of column in a table?
    20. How to sum a column and make rename is something?
    21. How to do a count of a column in a table (without repeats e.g. if a certain number repeats more than once than to only count it once)?
    22. How to use a subquery to find certain fields in columns when the another column’s fields values are greater than e.g. its average price?

    848290 wrote:
    Hey I'm trying to get a working understanding of some of the basics behind SQL, I've composed a few questions that I think may help me with this. Anyone that can help me with any of them will greatly help me thanks.To use the terminology you have in those questions, you must already have a basic understanding of SQL, so you have exposed yourself as not being the author of such questions.
    Please do not ask homework questions without having at least attempted to answer them yourself first and show where you're struggling.

  • Help with basic ABAP code (merge internal tables, sort of...)

    Hello,
    Can someone please help write some basic code for a Basis guy with limited ABAP knowledge?
    Should be some easy points for an experienced ABAPer!
    I have identicaly structured internal tables I_A and I_B and I_C which have already been filled by function models I called.
    How will I code the following?:
    I want to read all the data of I_A into a new internal table I_MASTER (structured the same as I_A,I_B and I_C).
    Then I want to read I_B and:
    1)Update I_MASTER with NEW records
    2)Update existing records if the value of field MYFIELD in I_B is smaller than the value of MYFIELD in I_MASTER.
    Then I want to read I_C and:
    1)Update I_MASTER with NEW records
    2)Update existing records if the value of field MYFIELD in I_C is smaller than the value of MYFIELD in I_MASTER.
    Let me know if I can provide anymore information.
    Thanks in advance for you help!
    Adriaan
    Message was edited by: Adriaan
    Message was edited by: Adriaan

    Hi Adriaan ,
    I want to read all the data of I_A into a new internal table I_MASTER (structured the same as I_A,I_B and I_C).
    <b>i_master[] = i_a[] .</b>
    loop at i_b .
    read table i_master with key myfiled < i_b-myfield .
    if sy-subrc = 0 .
    append i_master from i_b .
    endif.
    endloop.
    loop at i_c .
    read table i_master with key myfiled < i_c-myfield .
    if sy-subrc = 0 .
    append i_master from i_c .
    endif.
    endloop.
    Let me know if this helped .
    Regards,
    Varun .
    Message was edited by: varun sonu

  • Help with some regex

    Hi i was wondering if anyone could hep me create a regex pattern.
    I need to search a String for the substring "X-Mozilla-Status: ****" where the four stars can be any number,
    i came up with this:
    "X-Mozilla-Status: [0-9]+"but the program isn't working and im asuming its because this isn't right.
    can anyone help?
    thanks

    lol ok,
    the output is exactly the same as the input text, nothing has been replaced (and yes there are plenty of the subtrings lurking in the text file to be replaced).
    no exceptions are being thrown.
    current code:
    import java.io.*;
    public class EmailFixer {
        public static void main(String[] args) {
            String line = "";//string to hold each line as it is read in
            String text = "";//string to hold entire text file, each line is added
            String regex = "^X-Mozilla-Status: [0-9]+$";//regex pattern to replace
            String replace = "X-Mozilla-Status: 0005";//replacement string
            try{
                 *read inbox.txt line by line, adding to text String
                BufferedReader in = new BufferedReader(new FileReader("inbox.txt"));
                while ((line = in.readLine()) != null){
                    text = text + "\n" + line;
                 *once all text is read in replace all text which matched regex pattern with replacement String
                text = text.replaceAll(regex, replace);
                in.close();
                System.out.println(text);//print out the ammended text
            catch(Exception e){//catch exceptions
                e.printStackTrace();
        }//end main
    }//end classinput (and coincidentally output):
    Test file
    From - Wed Sep 24 00:06:17 2008
    X-Account-Key: account3
    X-UIDL: 1
    X-Mozilla-Status: 0009
    X-Mozilla-Status2: 10000000
    X-Mozilla-Keys:                                                                                
    Return-Path: <[email protected]>
    From - Wed Sep 24 00:06:17 2008
    X-Account-Key: account3
    X-UIDL: 1
    X-Mozilla-Status: 0002
    X-Mozilla-Status2: 10000000
    X-Mozilla-Keys:                                                                                
    Return-Path: <[email protected]>
    From - Wed Sep 24 00:06:17 2008
    X-Account-Key: account3
    X-UIDL: 1
    X-Mozilla-Status: 0003
    X-Mozilla-Status2: 10000000
    X-Mozilla-Keys:                                                                                
    Return-Path: <[email protected]>
    From - Wed Sep 24 00:06:17 2008
    X-Account-Key: account3
    X-UIDL: 1
    X-Mozilla-Status: 0001
    X-Mozilla-Status2: 10000000
    X-Mozilla-Keys:                                                                                
    Return-Path: <[email protected]>

  • Really need help with basic static forms?!?!

    I was thrown into creating forms for our Business Managers and I am not a developer in any way!  I am a Recruiter, but somewhat tech savvy (or at least I thought I was). 
    I am trying to create basic static forms.  I started by using Adobe Professional and them moved to LiveCycle Designer because of what I thought were better "editable" options when creating the form.  I want to be able to send my manager's forms via e-mail (PDF), they can enter the requesting information in the fields, save a copy for themselves, print, and e-mail to me.  We are not using any of the Adobe Server things, I don't want them to submit via an e-mail button on the form.  We are a non-profit organization and my managers are using all different versions of reader. 
    I am getting extremely frustrated because in testing the form everything seems to be working properly including tab order, print, save and everything I want it to do.  Then, I send them out for my managers to use, for some Manager's they work great, no problems at all!  But then, I keep getting these weird issues from different Managers with the same form.  For one of them, what they typed in the field, now looks like it's behind the text box, like when you select Highlight all, you can see what he typed, but then if you click into the text box, you can see what he typed. Another Manager said, two (crucial) fields would not show the text entered when she tries to save or print, but on screen you can see it????
    So after the rambling, I guess my questions are: should I be using Live Cycle to create such basic forms or should I be using Adobe?  Can anyone recommend a good "FOR DUMMIES" book that will help me figure out what I am doing wrong, and not explain in "IT" language?
    This is really getting embarrassing!! Any help would be greatly appreciated!!!!

    1. Make sure to set the PDF target version. Goto File -> Form Properties (see the first screenshot attached)
         Find out the minimum Reader version used in your organization and set this value accordingly. If you are not sure, select the least recent version.
    2. two (crucial) fields would not show the text entered when she tries to save or print, but on screen you can see it
         This may be due to the visibility settings of the fields. Just make sure that you have selected visible instead of visible (screen only)
         See the second screenshot attached
    Hope this may help you.
    Nith

  • Absolue beginner need your help with basics of shell / applescript and xode

    Guys,
    I'm an absolute beginner in both xcode and applescript trying to wrap a few shell commands with some basic graphical elements.
    I will need your help after 2 days of tests and un-successful trials.
    Trying to display "$ifconfig en0" shell results into a text box.
    Here is what I'm doing:
    property networkif : missing value
    property dhcpview : missing value
    set the dhcpview to do shell script "/sbin/ifconfig " & networkif
    I can't have this accepted:
    set contents of text field "hmmm" to "DHCP " & dhcpview
    hmm is the name I have set under Interface Builder to a text box (NSTextView object)
    Xcode compiler returns me an error :
    ToolAppDelegate.applescript:99: error: A “"” can’t go after this identifier. (-2740)
    Command /usr/bin/osacompile failed with exit code 1
    while doing this is absolutely working but on a separate popup window:
    display dialog " Here is your IP address in ALU's network: " & dhcpview
    I have no clue what I'm doing wrong.

    It looks like you are trying to use *AppleScript Studio* syntax in an AppleScriptObjectiveC project - the way you connect the user interface items to your script is different in the new framework. If you are creating a new ASOC project, take a look at MacScripter's entry level tutorial AppleScriptObjC in Xcode for some examples.

  • Please help with basic questions

    I hardly ever use flash, as i'm always ending up kicking
    stuff out of sheer frustration. Just like with Quark Xpress, in
    Flash there seem to be several 'layers' between what my intuition
    tells me should work, and the actual execution of the things i want
    to achieve. But nevermind, I'm just severely annoyed.
    I got 10 buttons, with a graphic as bottomlayer, and a number
    (1-10). Isn't it possible to turn the first button into a symbol,
    and then make copies where i just have to change the number? For
    now it doesn't matter if i copy/paste them or drag them from the
    library, when i copy the button and try to change the number in the
    copy, then the number in the 'original' changes as well.
    Do i really have to 'make' each button from scratch?
    This might seem like a very basic question, but i'm really
    bangin my head into the wall here. And theres tons og issues like
    that in Flash - for me at least - like if i say 'paste in place',
    things get pasted some random place on the canvas (anywhere but in
    place). If i convert to symbol, the referencepoint (or the point
    which it's supposed to rotate around) seems randomly choosen as
    well - at least it's never where i told it to be in the appropriate
    dialog.
    HELP! :-(

    Go to the library and there should be an arrow in the corner
    that gives you options. One option is "duplicate symbol." Duplicate
    your button and give it a new name, then make the changes.

  • Need help with basic steps in creating ebook

    I have a confession: I constantly use workarounds instead of stopping and learning the proper way of using Indesign to create ebooks. I wouldn't say I do it because I'm lazy, but rather because I'm simply inept lol. These are some of the basic steps I take:
    1. create new document: include master text frame (because I want page numbers to show)
    2. paste unformatted text into document
    3. adjust size of master frame to give text suitable margins (since its an ebook, right/left margins same on opposing pages.)
    4. highlight all text, adjust before- and after-paragraph spacing to half of the character leading (so bottom of text is at same point for each page)
    5. go to chapter titles; do page-break so title has its own page; highlight title, choose font, size; create new character style; apply style to other chapter titles (is it possible to create a ctrl + number shortcut to apply character styles?). Notice I didn't create a character style for body text. Should I do that first?
    6. insert page number markers on both master pages, then cover page number with white box on first page of chapters.
    7. drop pictures into textbox so that if more text is added, pictures move with the text.
    That's basically what I do when I create an ebook. Any suggestions as to better/proper way to do these things would be very appreciated.

    1. Master text frames have nothing to do with page numbers and in most cases are totally unnecessary. Set the margins appropriately and place your text.
    2. Without knowing what you're starting with it's impossible to tell if that's a good idea or not. My gut says is it's not. See number 1.
    3. See number 1.
    4. This is what paragraph styles are for.
    5. See number 4.
    6. This is what multiple master pages are for. Stop doing that.
    7. Well, you finally got one right. As my people would say...mazel tov.
    Now, it's time for you stop being inept (your word, not mine) and start learning the right way to do this. First thing you do is buy Sandee Cohen's Visual Quick Start Guide. It's the best InDesign book on the market for beginners. http://amzn.to/plsvxy
    Secondly, check out the video training on Lynda.com. This link will get you a free one week trial: http://bit.ly/fcGpiI
    Bob

  • Need help with basic "for" loops!

    Here is my prompt for class:
    Write a program that prompts the user to enter a sentence from the keyboard using JOptionPane.showInputDialog.
    The program will print the characters back with the first letter of each word changed from lower case into upper case. If you have a capital letter in the original line and it is not the first letter of a word, then this letter should be switched from upper case to lower case. The only capital letters that should appear in the line must be the beginning letter of every word in the line. All other characters will remain the same.
    I figured everything out except for one part. How do I make the first letter of each word change from lower case into uppercase? How do I switch a letter that is uppercase in the middle of a word to lowercase? Last but not least, how do I make sure that the only capital letters in the sentence are the first letter of each word?
    I need to do this using for Loops, charAt(), and if/else statements because this is just an intro class. I just can't figure this last part out! Help please!

    String words = ...;
    StringBuilder builder = new StringBuilder();
    for (int i = 0; i < words.length; i++) {
    char c = words.charAt(i);
    boolean isUpper = Character.?(look up the methods in java.lang.Character)
    boolean isLetter = ? (there are actually 2 ways to do this. Hint: you can use <= and >= and && to solve this)
    if (!isLetter) {
    continue;
    } else {
    // check if this is the start of the word. How do you know that you are at the start of a word?
    if (!isUpper && isStartOfTheWord) c = Character.toUpperCase(c); //Hint: there is a way you can do this with x + y
    else if (isUpper) //make c lower case
    builder.append(c);
    return builder.toString();

  • Help with basics

    Hi
    How do I make a transition between 2 clips. I highlight the 2 clips and go to the transitions box and select cross disolve and nothing happens.
    Is it me or is this the most complex piece of software since Logic 7?
    Just to get a bit of perspective here, about 10 years ago, I shot an hours worth of video and never having opened imovie before, put together a music video with 300 edits and crossfades,stills,titles etc. in 12 hours!
    Now I can't even fade a clip in.
    I can't even find how to do it in the help files
    G

    You can drag the transition and drop it in between the two clips right from the window that shows you what the transitions look like. Click the mouse right on the transition thumbnail and drag in between the two clips. You'll see a green highlight appear once you have the mouse in the right position to drop the transition.

  • Help with basic program

    The program I am writing is supposed to ask the user to input a 4-digit Integer whose digits are not all the same, and then place the number in descending and ascending order, then subtract until the number 6174 is met.
    I'm very new with java but I can't seem to get my if statement to loop back until the condition I want is met.
    I know that a while statement will loop back, but when I tried that it just kept looping over and over again.
    Any help and tips for later on in my project will be great.
    import java.util.Scanner;
    public class program2
        public static void main(String[] args)
          int      Number, D1, D2, D3, D4, Temp;
          Scanner  Keyboard = new Scanner(System.in);
          boolean  NoNumberYet;
          System.out.println("Please enter a 4-digit positive integer whose digits are all different: ");
          Number = Keyboard.nextInt();
          D1 = (Number/1000);
          D2 = (Number/100) %10;
          D3 = (Number/10) %10;
          D4 =  Number %10;
          NoNumberYet = true;
          while(NoNumberYet) 
            if (D1 == D2 && D2 == D3 && D3 == D4)
               NoNumberYet = false;
               System.out.println("The number you entered contains the same digits.");
               System.out.print("Please re-enter the number: ");
               Number = Keyboard.nextInt();
        }

    On to a new question.
    I need to subtract the rearranged descending number by the ascending arranged number.
    I need to know how to place my rearranged digits in place of the original number and then subtract it.
    Heres what I have so far:
    import java.util.Scanner;
    public class program2
        public static void main(String[] args)
          int      Number, d1, d2, d3, d4, temp;
          Scanner  Keyboard = new Scanner(System.in);
          System.out.println("Please enter a 4-digit positive integer whose digits are all different: ");
          Number = Keyboard.nextInt();
          d1 = (Number/1000);
          d2 = (Number/100) %10;
          d3 = (Number/10) %10;
          d4 =  Number %10;
          if (d1 == d2 && d2 == d3 && d3 == d4)
               System.out.println("The number you entered contains the same digits.");
               System.out.print("Please re-enter the number: ");
               Number = Keyboard.nextInt();
          if (d1 < d2)
             temp = d1;
             d1   = d2;
             d2   = temp;
          if (d2 < d3)
             temp = d2;
             d2   = d3;
             d3   = temp;
          if (d3 < d4)
             temp = d3;
             d3   = d4;
             d4   = temp;
          if (d1 < d2)
             temp = d1;
             d1   = d2;
             d2   = temp;
          if (d2 < d3)
             temp = d2;
             d2   = d3;
             d3   = temp;
          if (d1 < d2)
             temp = d1;
             d1   = d2;
             d2   = temp;
    }Any help would be appreciated, also the output needs to appear on screen.
    My guess is that I need to somehow drop d1, d2 ,d3, and d4 into a new variable, and then subtract from the reverse. I dont know how to drop the digits into a new number, or the original entered number.
    Thanks.
    Message was edited by:
    Bmiller234

  • Help with Basics! Dragging and dropping clips

    Good Morning! I've been frustrating myself for weeks just trying to get started. I've uploaded all my video clips through a firewire connection and they look fine. However, when I simply want to drag and drop a clip into the timeline it doesn't work. I have tried it on both the clip and the timeline viewer and have tried cropped and uncroppd videos clips. HELP! I thought this was the easy part. I even have a book, video and online help, but everything says simply "drag and drop clip" Any help is welcome. Thanks! Quail

    Hi Matthew:
    Maybe he could try deleting the iMovie preference files? Seems to fix some of the strangest of problems at times-do you agree?
    Quail:
    Try deleting the imovie preference file. Locate a file named com.apple.imovie.plist and get rid of it. Then empty the trash, run a permissions repair with disk utility and restart. That should do it. The files you need to delete are found in:
    /Users/YourName/Library/Preferences/com.apple.imovie.plist
    Sue

  • Please help with basic guidance on editing a DVD on my iMac

    I am trying to transfer old VHS tapes of my grandchildren onto DVDs. Currently, I am using a Sony Video Cassette Recorder/DVD Recorder model RDR-VX530 for the dubbing. What I want to know is how to edit a completed DVD (DVD-RW or DVD-R) on my iMac. I have never even tried this and am not sure how to even begin or what is possible.
    Any help would be greatly appreciated! Thanks.

    Shouldn't this person be able to put it to DVD. Load it, and using iMovie to download the movie? There they can mess around with it, and re-burn it to disk?
    Personally, I use a media converter. I've convert VHS, Laser Disks, and other things like 8 tracks, and cassettes. My media converter is a Sony. You can find them on eBay. Just search Sony Media Converter. I love this unit, and I will never get rid of it. I have had to buy Adapters (For the newer iMac) from time to time but, it's worth it.

Maybe you are looking for

  • Ken Burns Effect question

    I am using iPhoto 5.0.4. When I select a number of photos (or even one photo) and select slideshow, I get the Ken Burns effect whether the KBE box is checked or not. How do I defeat the KBE? Sometimes it's great-- but I'd like the option for a plain

  • Purchasing display from HP/Dell/other

    I have been trying to research before purchasing two new widescreen displays for my MacPro. I believe that the apple displays have too many issues with them and are too expensive. I'd like to purchase something more affordable, but which will work we

  • Create a node with the newest date only

    Hi, I want to create a node in the target, only by the newest date from the source. The source is an Idoc with, say, 3 segments of the same kind, with different dates. Only the segment with the newest date, should be created in the target. Any Ideas?

  • Adobe shockwave player error

    Hi - I'm trying to use a virtual garden utility on a website http://www.bbc.co.uk/gardening/design/ but when I launch it I get an error saying I dont have the right adobe shockwave xtra ..... I've followed the links, uninstalled and reinstalled and r

  • Why am I missing over half my purchased library?

    I recently had to rebuild my windows 7 laptop, and when I installed iTunes, over 40 songs were missing. Not in iCloud. Not under the "purchased" quicklink in the store, but when I searched the songs specifically, I found them in the store, and they a