Need help with regular expression

I'm trying to use the java.util.regex package to extract URLs from html files.
The URLs that I am interested in extracting from the HTML look like the following:
<font color="#008000">http://forum.java.sun.com -
So, the URL is always preceeded by:
<font color="#008000">
and then followed by a space character and then a hyphen character. I want to be able to put all these URLs in a Vector object. This doesn't seem like it should be too difficult but for some reason I can't get anywhere with it. Any help would be greatly appreciated. Thanks!

hi gupta am not sure of the java syntax but i can tell u about the regular expression...try this....
<font color="#008000">(http:\/\/[a-zA-Z0-9.]+) [-]
i dont know the java methods to call...just the reg exp...
Sanjay Acharya

Similar Messages

  • Need help with Regular Expressions

    This is my XML code
    *<name>J. E. O'Rrrrrr, S. Mmmmmmmmmm, B. G. Mmmmmmmm, A. B. C. Xxxxxx Yyyyy, A. B. C. Zzzz and C. R. McCcccc</name>*
    This is my source code
    Regex = Pattern.compile("<name>.*?</name>");
    RegexMatcher = Regex.matcher(fetchWholeFile);
    while(RegexMatcher.find())
    chkEnty = RegexMatcher.group();
    Pattern RegexTry1 = Pattern.compile("([A-Z]{1}\\.[A-Z]{1}\\.[A-Z]{1}\\.){color:#ff6600}|{color}([A-Z]{1}\\.\\s[A-Z]{1}\\.\\s[A-Z]{1}\\.){color:#ff6600}|{color}([A-Z]{1}\\.[A-Z]{1}\\.){color:#ff6600}|{color}([A-Z]{1}\\.\\s[A-Z]{1}\\.){color:#ff6600}|{color}([A-Z]{1}\\.)");
    //In the above line I am trying to catch all the initials (3 initals, 2 initials & 1 initial)
    Matcher RegexMatcherTry1 = RegexTry1.matcher(chkEnty);
    while(RegexMatcherTry1.find())
    String chkEntyTry1 = RegexMatcherTry1.group();
    Tagged11="<fname>"+chkEntyTry1+"</fname>";
    fetchWholeFile=fetchWholeFile.replace(chkEntyTry1,Tagged11);
    After executing the above code, my out is
    *<name><fname>J.</fname>* E. O'Rrrrrr, *<fname>S.</fname>* Mmmmmmmmmm, *<fname><fname><fname><fname>B.</fname></fname></fname></fname> <fname>G.</fname>* Mmmmmmmm, *<fname>A.</fname>* *<fname><fname><fname><fname>B.</fname></fname></fname></fname>* *<fname>C.</fname>* Xxxxxx Yyyyy, *<fname>A.</fname>* *<fname><fname><fname><fname>B.</fname></fname></fname></fname>* *<fname>C.</fname>* Zzzz and *<fname>C.</fname>* *<fname><fname>R.</fname></fname>* McCcccc*</name>*
    But I need my out as below
    *<name><fname>J. E. </fname><sname>O'Rrrrrr</sname>,* *<fname>S. </fname><sname>Mmmmmmmmmm</sname>*, *<fname>B. G. </fname><sname>Mmmmmmmm</sname>*, *<fname>A. B. C. </fname><sname>Xxxxxx Yyyyy</sname>*, *<fname>A. B. C. </fname><sname>Zzzz </sname>and <fname>C. R. </fname><sname>McCcccc</sname></name>*
    Could some also tell me how do I apply *<sname>*

    prometheuzz my source code as suggested by you is
    public void lineread(String FileName)
         try
              File asciiFile1 = new File(FileName);
              File tmp = new File(asciiFile1.getParent(),"Temp.xml");
              BufferedReader br = new BufferedReader(new FileReader(asciiFile1));
              BufferedWriter bw = new BufferedWriter(new FileWriter(tmp));
              String line = "";
              while((line = br.readLine()) != null)
                   fetchWholeFile+=line;
              Pattern Regex = Pattern.compile("<ref.list>.*?</ref.list>");
              Matcher RegexMatcher = Regex.matcher(fetchWholeFile);
              while(RegexMatcher.find())
                   chkEnty = RegexMatcher.group();
              Regex = Pattern.compile("<name>.*?</name>");
              RegexMatcher = Regex.matcher(chkEnty);
              while(RegexMatcher.find())
                   chkEnty = RegexMatcher.group();
                   Matcher m1 = Pattern.compile("([A-Z]\\.\\s?)+").matcher(chkEnty);
                   while(m1.find())
                        String Fname1=(m1.group());
                        String Fname2=("<fname>"+m1.group()+"</fname>");
                        FnameVector1.addElement(Fname1);
                        FnameVector2.addElement(Fname2);
                   Matcher m2 = Pattern.compile("([A-Z]['a-z]+\\s?)+").matcher(chkEnty);
                   while(m2.find())
                        String Sname1=(m2.group());
                        String Sname2=("<sname>"+m2.group()+"</sname>");
                        SnameVector1.addElement(Sname1);
                        SnameVector2.addElement(Sname2);
              for(int v=0;v<FnameVector1.size();v++)
         System.out.println(FnameVector1.elementAt(v));//It's printing fine here      
              for(int v=0;v<FnameVector2.size();v++)
                   System.out.println(FnameVector2.elementAt(v));//It's printing fine here
                   fetchWholeFile=fetchWholeFile.replace(FnameVector1.elementAt(v).toString(), FnameVector2.elementAt(v).toString());//But if I update to input XML file, it's wrong as shown below
              for(int v=0;v<SnameVector1.size();v++)
         System.out.println(SnameVector1.elementAt(v));//It's printing fine here
              for(int v=0;v<SnameVector2.size();v++)
                   System.out.println(SnameVector2.elementAt(v));//It's printing fine here
                   fetchWholeFile=fetchWholeFile.replace(SnameVector1.elementAt(v).toString(), SnameVector2.elementAt(v).toString());//But if I update to input XML file, it's wrong as shown below
              bw.write(fetchWholeFile);
              bw.flush();
              bw.close();
              br.close();
              File org = new File(FileName);
              System.gc();
              System.out.println(asciiFile1.delete());
              tmp.renameTo(org);
         catch(IOException ioe)
              System.out.println(ioe);
    This is my XML file
    <?xml version="1.0" encoding="UTF-8"?>
    <ref-list>
    <name>A. B. Cccccc and X. Y. Zzzzzz</name>
    <name>K. Name</name>
    The output after executing the above source code is
    <?xml version="1.0" encoding="UTF-8"?>
    <ref-list>
    <name><fname>A. </fname>B. <sname>Cccccc</sname>and <fname>X. <fname>Y. </fname></fname><sname>Zzzzzz</sname></name>
    <name><fname><fname><fname><fname><fname><fname>K. </fname></fname></fname></fname></fname></fname><sname>Name</sname></name>
    But I need my output as
    <?xml version="1.0" encoding="UTF-8"?>
    <ref-list>
    <name><fname>A. B. </fname><sname>Cccccc</sname>and <fname>X. Y. </fname><sname>Zzzzzz</sname></name>
    <name><fname>K. </fname><sname>Name</sname></name>
    Please tell me where have I gone wrong.

  • Need help with Airport Express and so on.

    Ok so my main problem before getting into what I need help with here is that our MacBooks and now my iPhone 6 plus isn't staying online. Keep getting booted off and then I either have to select the network again or it will eventually go back on. If anyone has a solution or so please feel free to answer that as well. I'm running on Roadrunner with a Netgear 600 wireless router and a motorola modem. Both of which I'll leave the link to below for a better look.
    My Main Question: So I'm looking at a new wireless router mainly and possibly a new modem. I know Apple products are trustworthy but how good is the Airport Express and other Airport products. Also what is the Maximum speed and Maximum data speed for the cheapest express station and if anyone knows the speeds of the other devices it would be greatly appreciated.

    DSL Router to Netgear 5-port Switch and I used the switch to connect to Airport Extreme, TV, Blue-Ray DVD player and DirecTV Receiver.
    The AirPort Extreme base station (AEBS) is a router so it will do what you need.
    You need to reconfigure your setup. Connect the WAN port of the AEBS to the DSL router. Then connect the Netgear switch to one of the LAN ports on the AEBS. The AEBS will properly share the connection.

  • Help with regular expression needed

    Hi,
    Perhaps someone here can help me with my regular expression I'm trying to build in my Java code.
    The regular expression that I'm looking to build consists of any non-whitespace character up until it finds one or two <>= symbols and then any character thereafter. So both these Strings would match the expression:
    City 1==London
    Age>=18
    The regular expression that I'm using is as follows:
    (\\S+)([><=]){1,2}(.+)However, group 1 always retrieves the first <>= symbol as in "City 1=". How can I make the <>= part greedy so that it retrieves both operator symbols?
    Thanks.

    Make the first group, the non-spaces, reluctant:
    "(\\S+?)([<>=]{1,2})(.+)"

  • Help with Regular Expression for field validation

    I'm fairly new to using regular expressions and using Acrobat. This is probably a simple question, but I've been unable to figure it out.
    I have a text field on a PDF that I would like to be 9 characters in length. The first 2 characters can only be alphanumeric, the last 7 characters can only be numeric.
    At first I was using the following, which allows all the characters to be alphanumeric:
    var re = /^[A-Za-z0-9 :\\_]$/;
    if (event.change.length >0) {
    if (event.willCommit == false) {
        if (!re.test(event.change)) {
            event.rc = false
    That works fine, but it's not quite what I needed. With some assistance I changed it (see below) to fit what I was looking for. However, this didn't work; it prevents anything from being entered in the field:
    var re = /^[A-Za-z0-9]{2}\d{7}$/;
    if (event.change.length >0) {
    if (event.willCommit == false) {
        if (!re.test(event.change)) {
            event.rc = false
    Any help would be greatly appreciated.
    Thanks...

    Here's a function you can call form the field's custom Format script. It should be placed in a document-level JavaScript:
    function custom_ks1() {
        // Define non-commited regular expression
        var re = /^[A-Za-z0-9]{0,2}([0-9]{0,7})?$/;
        // Get all of the characters the user has entered
        var value = AFMergeChange(event);
        // Allow field to be cleared
        if(!value) return;
        if (event.willCommit) {
            // Define commited regular expression
            var re = /^[A-Za-z0-9]{2}[0-9]{7}$/;
            if (!re.test(value)) {  // If final value doesn't match, alert user
                app.alert("Your error message goes here.");
                // event.rc = false
        } else {  // not commited
            // Only allow characters that match the regular expression
            event.rc = re.test(value);
    Call it like this:
    // Custom Keystroke script
    custom1_ks();

  • Help With Regular Expression In Apex Validation

    Apex 3.2
    There is a validation type of regular expression in apex, but I have never used regular expression before,
    so a little help is appreciated.
    I need to validate a field. It is only allowed to contain alpha characers, numbers, spaces and the - (dash) character.
    I have tried several times to get this working
    eg
    [[:alpha:]]*[[:digit:]]*[[:space:]]*[-]*
    ^[[:alpha:][:digit:][:space:]-]+?
    and others, but just can't to get the syntax correct.
    Can someone help me with this please
    Gus

    Example:
    SQL> ed
    Wrote file afiedt.buf
      1  with t as (select 'This is some example text' as txt from dual union all
      2             select 'And this is the 2nd one with numbers' from dual union all
      3             select 'And this allows double-barrelled words with hyphens' from dual union all
      4             select 'But this one shouldn''t be allowed!' from dual
      5            )
      6  --
      7  select *
      8  from t
      9* where regexp_like(txt, '^[[:alnum:] -]*$')
    SQL> /
    TXT
    This is some example text
    And this is the 2nd one with numbers
    And this allows double-barrelled words with hyphens

  • Help with Regular Expressions and regexp_replace

    Oh great Oracle Guru can I can gets some help
    I need to clean up the phone numbers that have been entered in Oracle eBusiness per_phones table. Some of the phone numbers have dashes, some have spaces and some have char. I would just like to take all the digits out and then re-format the number.
    Ex.
    914-123-1234 .. output (914) 123-1234
    9141231234 ..again (914) 123-1234
    914 123 1234 .. (914) 123-1234
    myphone ... just null
    (914)-123-1234.. (914) 123-1234
    I really tried to understand the regular expressions statments, but for some reason I just can't understand it.

    Hi,
    Welcome to the forum!
    I would create a user-defined function for this. I expect there will be a lot of exceptions to the regular rules (for example, strings that do not contain exactly 10 digits, such as '1-800-987-6543') that can be handled, but would require lots of nested fucntions and othwer complicted code if you had to do it in a single statement.
    If you really want to do it with a regular expression:
    SELECT     phone_txt
    ,     REGEXP_REPLACE ( phone_txt
                     , '^\D*'          || -- 0 or more non-digits at the beginning of the string
                           '(\d\d\d)'     || -- \1 = 3 consecutive digits
                    '\D*'          || -- 0 or more non-digits
                           '(\d\d\d)'     || -- \2 = 3 consecutive digits
                    '\D*'          || -- 0 or more non-digits
                           '(\d\d\d)'     || -- \3 = 4 consecutive digits
                    '\D*$'             -- 0 or more non-digits at the end of the string
                     , '(\1) \2-\3'
                     )          AS new_phone_txt
    FROM    table_x
    ;

  • Help with regular expression to find a pattern in clob

    can someone help me writing a regular expression to query a clob that containts xml type data?
    query to find multiple occurrences of a variable string (i.e <EMPID-XX> - XX can be any number). If <EMPID-01> appears twice in the clob i want the result as EMPID-01,2 and if EMPID-02 appears 4 times i want the result as EMPID-02,4.

    with
    ofx_clob as
    (select q'~
    <EMPID>1
    < UNQID>123456
    < TIMESTAMP>...
    < ADDRINFO>
    < TITLE>^@~*
    < FIRST>ABCD
    < MI>
    < LAST>EFGH
    < ADDR1>ADDR1
    < ADDR2>^@~*
    < CITY>CITY
    <EMPID>2
    < UNQID>123457
    < TIMESTAMP>...
    < ADDRINFO>
    < TITLE>^@~*
    < FIRST>ABCD
    < MI>
    < LAST>EFGH
    < ADDR1>ADDR1
    < ADDR2>^@~*
    < CITY>CITY
    <EMPID>1
    < UNQID>123458
    < TIMESTAMP>...
    < ADDRINFO>
    < TITLE>^@~*
    < FIRST>ABCD
    < MI>
    < LAST>EFGH
    < ADDR1>ADDR1
    < ADDR2>^@~*
    < CITY>CITY
    ~' ofx from dual
    select '<EMPID>' || to_char(ids) || '(' || to_char(count(*)) || ')' multi_empid
      from (select replace(regexp_substr(ofx,'<EMPID>\d*',1,level),'<EMPID>') ids
              from ofx_clob
            connect by level <= regexp_count(ofx,'<EMPID>')
    group by ids having count(*) > 1
    MULTI_EMPID
    <EMPID>1(2)
    with
    ofx_clob as
    (select q'~
    <EMPID>1
    < UNQID>123456
    < TIMESTAMP>...
    < ADDRINFO>
    < TITLE>^@~*
    < FIRST>ABCD
    < MI>
    < LAST>EFGH
    < ADDR1>ADDR1
    < ADDR2>^@~*
    < CITY>CITY
    <EMPID>2
    < UNQID>123457
    < TIMESTAMP>...
    < ADDRINFO>
    < TITLE>^@~*
    < FIRST>ABCD
    < MI>
    < LAST>EFGH
    < ADDR1>ADDR1
    < ADDR2>^@~*
    < CITY>CITY
    <EMPID>1
    < UNQID>123456
    < TIMESTAMP>...
    < ADDRINFO>
    < TITLE>^@~*
    < FIRST>ABCD
    < MI>
    < LAST>EFGH
    < ADDR1>ADDR1
    < ADDR2>^@~*
    < CITY>CITY
    <EMPID>2
    < UNQID>123456
    < TIMESTAMP>...
    < ADDRINFO>
    < TITLE>^@~*
    < FIRST>ABCD
    < MI>
    < LAST>EFGH
    < ADDR1>ADDR1
    < ADDR2>^@~*
    < CITY>CITY
    <EMPID>1
    < UNQID>123458
    < TIMESTAMP>...
    < ADDRINFO>
    < TITLE>^@~*
    < FIRST>ABCD
    < MI>
    < LAST>EFGH
    < ADDR1>ADDR1
    < ADDR2>^@~*
    < CITY>CITY
    ~' ofx from dual
    select '<EMPID>' || listagg(to_char(ids) || '(' || to_char(count(*)) || ')',',') within group (order by ids) multi_empid
      from (select replace(regexp_substr(ofx,'<EMPID>\d*',1,level),'<EMPID>') ids
              from ofx_clob
            connect by level <= regexp_count(ofx,'<EMPID>')
    group by ids having count(*) > 1
    MULTI_EMPID
    <EMPID>1(3),2(2)
    Regards
    Etbin
    Message was edited by: Etbin
    used listagg to report more than one multiple <EMPID>

  • Help with Regular Expressions

    I have some sample code for string editing using regular expressions but I'm a little confused as to it's behavior. Here's what I have:
    public class WordFixer
        protected final String PUNC_MATCH = "[\\d\\p{Punct}]+";
        protected final String PUNC_PREFIX = "^" + PUNC_MATCH;
        protected final String PUNC_SUFFIX = PUNC_MATCH + "$";
        public String fixPrefix (String w)
            return w.replaceFirst(PUNC_PREFIX, "");
        public String fixSuffix (String w)
            return w.replaceFirst(PUNC_SUFFIX, "");
        }This replaces all leading and trailing punctuation with "" and it works. However, changing the replaceFirst's to just replace doesn't work. I don't understand why that is. Doesn't the ^ mean in the front, and doesn't the $ mean in the back, so shouldn't this work by just changing replaceFirst to replace?

    JFactor2004 wrote:
    I have some sample code for string editing using regular expressions but I'm a little confused as to it's behavior. Here's what I have:
    public class WordFixer
    protected final String PUNC_MATCH = "[\\d\\p{Punct}]+";
    protected final String PUNC_PREFIX = "^" + PUNC_MATCH;
    protected final String PUNC_SUFFIX = PUNC_MATCH + "$";
    public String fixPrefix (String w)
    return w.replaceFirst(PUNC_PREFIX, "");
    public String fixSuffix (String w)
    return w.replaceFirst(PUNC_SUFFIX, "");
    }This replaces all leading and trailing punctuation with "" and it works. However, changing the replaceFirst's to just replace doesn't work. I don't understand why that is. The first parameter of the replaceFirst(...) is a regex-String. And the ^, $ and [...] stuff all have a special meaning in the regex language. The replace(...) method takes plain-Strings as a parameter, so the String "^\[\\d\\p{Punct}\]+" is interpreted as just that, without any special meaning.
    JFactor2004 wrote:
    Doesn't the ^ mean in the front, and doesn't the $ mean in the back, Yes, ^ means the start of the String (sometimes the start of a line) and $ means the end of the String (sometimes the end of a line).
    JFactor2004 wrote:
    so shouldn't this work by just changing replaceFirst to replace?Nope, see the explanation above.

  • Need help with Regual Expressions

    I need to validate for the following invalid characters in Java: ! @ # $ ^ * + = { } [ ] | \ < > ?
    Pattern pattern = Pattern.compile(" ") ?
    What is the right approach to do that?
    Thank you
    Eugene

    SolutionQuest wrote:
    Thank you for your response.
    My question was
    What regular expression could be used to provide as a parameter to pattern.compile() that matches the listed characters?
    Thank'sOkay, then my remark about the matches method applies: use that instead of Pattern.compile(...) (under the hood, it does the same). Go ahead and read the API docs of that method: it explains how to use it and also links to a document that explains a bit about the regex meta characters. Post back if you have tried something but failed. Please also post what you have tried so that others can point the error in your logic: it is the best way to learn.
    Good luck.

  • Litte help with regular expression?

    Greetings all,
    I have a simple regular expression "(\\w+)\\s(\\w+)\\s(.+)"
    Which I want to match against the strings like "Acetobacter pasteurianus LMD22.1"
    But this always fails whenever there is a dot (.) character like "LMD22.1" in above string.
    How to solve this ?
    Thanks in advance.

    Shouldn't that be Acinetobacter?
    edit: nope, I'm wrong, you're right.
    Edited by: Encephalopathic on Apr 7, 2009 7:34 PM

  • Need help on Regular expression and query

    Hi Guru's, Hope you all are doing great!.
    I have a scenario's where i need do insert the data into table.
    I have three scenarios :
    select 'Kodali,Raj,S' str from dual
    union
    select 'Alex Romano' from dual
    union
    select 'ppppp' from dual
    Alex Romano
    Kodali,Raj,S
    pppppNow what i want is .
    1. Alex Romano
    if there is space between the string then i want to insert into first name and last name columns
    2. Kodali,Raj,S
    if its a comma between the string then i want to insert into last name , first name and middle name
    3. if there is only one string then same insert into first name and last name.
    I wrote the query earlier to handle only comma and now i am trying but not able to use this all scenarios
    Can you please help me out.
    WITH t AS (
    select 'Kodali,Raj,S' str from dual
    union
    select 'Alex Romano' from dual
    union
    select 'ppppp' from dual
    select DECODE(trim(a),NULL,'a',trim(a)),DECODE(trim(b),NULL,'b',trim(b)),decode(trim(c),NULL,'c' ,trim(c))
    from
      SELECT max(decode(level,1,regexp_substr(str,'[^,]+',1,level))) a --INTO lFNAME
              , max(decode(level,2,regexp_substr(str,'[^,]+',1,level))) b --INTO lLNAME
              , max(decode(level,3,regexp_substr(str,'[^,]+',1,level))) c --INTO lMNAME      
       FROM   t
      CONNECT BY regexp_substr(str,'[^,]+',1,level) IS NOT NULL
      GROUP BY str
    ) ;Currently i am putting a b and c if its null.
    Thanks in advance!

    user590978 wrote:
    Hi Guru's, Hope you all are doing great!.
    I have a scenario's where i need do insert the data into table.
    I have three scenarios :
    select 'Kodali,Raj,S' str from dual
    union
    select 'Alex Romano' from dual
    union
    select 'ppppp' from dual
    Alex Romano
    Kodali,Raj,S
    pppppNow what i want is .
    1. Alex Romano
    if there is space between the string then i want to insert into first name and last name columns
    2. Kodali,Raj,S
    if its a comma between the string then i want to insert into last name , first name and middle name
    3. if there is only one string then same insert into first name and last name.
    I wrote the query earlier to handle only comma and now i am trying but not able to use this all scenarios
    Can you please help me out.
    WITH t AS (
    select 'Kodali,Raj,S' str from dual
    union
    select 'Alex Romano' from dual
    union
    select 'ppppp' from dual
    select DECODE(trim(a),NULL,'a',trim(a)),DECODE(trim(b),NULL,'b',trim(b)),decode(trim(c),NULL,'c' ,trim(c))
    from
    SELECT max(decode(level,1,regexp_substr(str,'[^,]+',1,level))) a --INTO lFNAME
    , max(decode(level,2,regexp_substr(str,'[^,]+',1,level))) b --INTO lLNAME
    , max(decode(level,3,regexp_substr(str,'[^,]+',1,level))) c --INTO lMNAME      
    FROM   t
    CONNECT BY regexp_substr(str,'[^,]+',1,level) IS NOT NULL
    GROUP BY str
    ) ;Currently i am putting a b and c if its null.
    Thanks in advance!It's never a popular suggestion, but why not fix the design to begin with?
    It's the year 2013, can a client not pass you a "complex" data structure consisting of first, middle and last name?
    Why rely on an unreliable construct when there are so many more usable way to achieve this?
    Cheers,

  • Help with regular expression to not run shtml-hacktype on particular reqs

    Hi,
    Okay, back to 7.0 u2 not ignoring things it should. Our regular site has a lot of SHTML includes. Then we have the glassfish loadbalancer plugin configured for a back-end web application. The problem is, the application URLs end in .html and the web server is looking locally for those requests. If I disable:
    ObjectType fn="shtml-hacktype"In the instance obj.conf, then the requests process normally in the proxy.
    I can't do that, though, because of the includes - then our main site doesn't function properly.
    Is there a way I can surround that line with something like "if request is not /gog/*" then execute? Similar to what I had to do for the j2ee problem looking locally instead of on the back end Weblogic servers.
    <If $uri =~ '^/wp-(.*)'>
    NameTrans fn="ntrans-j2ee" name="j2ee"
    </If>Only I want the opposite - if $uri is not equal to '^/gog/(.*)' then execute the shtml hacktype. I just don't know exactly what the expression would be.
    Thanks!

    Nevermind - I got it. RTFM :-)
    <If $uri !~ '^/gog/(.*)'>
    ObjectType fn="shtml-hacktype"
    </If>

  • Please help with regular expression

    Hello,
    With the help of my previous posting answers, Re: Procedure to Extract multiple substring from a string , I updated the query. But, I am not getting desired answer in all case. Could you please help me out? My query is based on the previous posting. Any other simple way to achieve this?
    I will really appreciate it.
    select
           ltrim ( regexp_substr(txt, '\[(\w+)', 1, level), '[')      as id, /* id is number */
           ltrim ( regexp_substr(ltrim ( regexp_substr(txt, ':[^]]+', 1, level), ':'), '\w+-*\d*', 1, 1), ':')  as qid, /* Qid could be char/number/space any combination except ':' */
           ltrim ( regexp_substr(ltrim ( regexp_substr(txt, ':[^]]+', 1, level), ':'), '\w+', 1, 2), ':')      as num,
          to_date( ltrim ( regexp_substr(ltrim ( regexp_substr(txt, ':[^]]+', 1, level), ':'), '[^:]+', 1, 3), ':'),'MM/DD/YY')   as effdate
    from  (
                            select  '[10946:M100:N:][10947:Q1222:N:][38198:PPP-2:N:][13935:PPP-6:N:][38244:QQQ-4:Y:01/01/10]'     as txt
                            from     dual
            connect by level <= length(regexp_replace(txt, '[^[]'));I should get :
    ID             QID          NUM         EFFDATE
    10946     M100     N     
    10947     Q1222     N     
    38198     PPP-2     N     
    13935     PPP-6     N     
    38244     QQQ-4     Y     01-JAN-10But, getting
    ID             QID          NUM          EFFDATE
    10946     M100     N     
    10947     Q1222     N     
    38198     PPP-2     2     
    13935     PPP-6     6     
    38244     QQQ-4     4     01-JAN-10Thanks,

    Hi,
    So the num column is wrong, is that it?
    Describe what the num column should be. For example "num is the 3rd part of the :-delimited list enclosed in the square brackets".
    If that's what you want, then change the definition of num from
    ...                     ltrim ( regexp_substr(ltrim ( regexp_substr(txt, ':[^]]+', 1, level), ':'), '\w+', 1, 2), ':')      as num,to
    ...                      REGEXP_SUBSTR  ( REGEXP_SUBSTR ( txt
                                          , '[^]]+'
                                                , 1
                                       , LEVEL
                             , '[^:]+'
                             , 1
                             , 3
                             )       AS num,

  • Need help with PCI Express X-Fi Xtreme Audio - Vista

    Hi, bought this card pci exprss x-fi xtreme audio and installed, had a lot of problems in vista 64. Using a logitech z5500 5. soundsystem and first tried using the optical spdif to get DTS etc working but to no joy... Started using the 3.5 kables but nothing there either. And I cant find options to set the treble and base? the sound is really medioker as it is now.
    Using the latest drivers for the card issued in may 08, latest alchemy and console files. what to do?
    Dave?

    To Collipa and Dudeface:
    If you installed the support pack for the card but still have driver problems, have you used windowsudpate under Windows 7? Creative submitted a basic driver for the card that shows up in driver options under Windows Update. If you can let Windows Update install that driver, then you can update AFTER rebooting with the new one.
    If that windowsupdate did not work, try this:
    Download the newest driver for your card. Then, if you already have winace, winzip, winrar or even the free 7Zip, then you can right click that Creative executable file and then choose to........extract to......and do so to a temporary folder on your desktop or say, c:\Creative driver.
    Then go to device manager and sound video and game controllers, and to your problem sound card, click driver, and update driver and browse my computer for software, and "let me pick"? and "have disk" and then browse to.......
    C:\Creative driver\Install\wdm
    Whereever you downlaoded the file to, the important directory is the INSTALL\WDM and choose OK and it should show Creative X-FI. Let it copy files, and it does take awhile, and then reboot and see if your sound card works.
    here is the newest driver for your card:
    http://ccftp.creative.com/manualdn/Drivers/AVP/0963/0xF7C73FBB/XFXA_PCDRV_LB__04_0090.exe

Maybe you are looking for