expression regular {}

Can you please explain the below two statement

SELECT COUNT (*)
OF THE DOUBLE
WHERE REGEXP_LIKE ('670013432423615 ', '^(6700[0-9]{11,15}$)')

SELECT COUNT (*)
OF THE DOUBLE
WHERE REGEXP_LIKE ('670013432423615 ', '^(6700[0-9]{12,15}$)')

We do match and another does not.

What is the diff?

Hello

2989211 wrote:

Can you please explain the below two statement

SELECT COUNT (*)
OF THE DOUBLE
WHERE REGEXP_LIKE ('670013432423615 ', '^(6700[0-9]{11,15}$)')

SELECT COUNT (*)
OF THE DOUBLE
WHERE REGEXP_LIKE ('670013432423615 ', '^(6700[0-9]{12,15}$)')

We do match and another does not.

What is the diff?

The difference is that the former has 11 where the second has 12:

' ^ (6700 [0-9] {11, 15} $) '

' ^ (6700 [0-9] {12, 15} $) '

Both are looking for '6700' at the beginning of the string, followed immediately of N digits, and then the end of the string.  The only difference is N.

In the first expression, N is a number between 11 and 15.  In this case, there are exactly 11 digits after '6700' in the string, so that it corresponds.

In the second expression, N is a s number 12 and 15.  11 is not between 12 and 15, so it does not.

Tags: Database

Similar Questions

  • Expression regular-not clear for the result

    I have written 3 applications using regular expressions, but I'm not very clear on the outcome. Looking for help to understand the logic.

    Here are the queries:

    1 > SELECT REGEXP_SUBSTR ('APT-101, BLDG 34, community xyz, XYZ ROAD, BANGALORE - 560066', '([[:alpha:]]+)') ADDR FROM DUAL;

    2 > SELECT REGEXP_SUBSTR ('APT-101, BLDG 34, community xyz, XYZ ROAD, BANGALORE - 560066', ' [[: alpha:]] +') ADDR FROM DUAL;

    3 > SELECT REGEXP_SUBSTR ('APT-101, BLDG 34, community xyz, XYZ ROAD, BANGALORE - 560066',(^'[[:alpha:]]+) ') ADDR FROM DUAL;

    All requests above returns the same result, i.e. 'APT '.

    Question: My understanding is:

    a > the regular expression [[: alpha:]] + represents one or more continuous occurrences of alphabets.

    b > parenthesis (i.e.) - represents the exact mactch

    c > carrot i.e. ^ represents the negation, that is to say. NOT (xyz)

    I can somehow convince myself that regular expressions - ' ([[: alpha:]] +)' and ' [[: alpha:]] +' in the given scenario may return the same string that is 'APT', but in the last query the regex ([[: alpha:]] + is preceded by ^, which according to my understanding should return something that isn't ONE or MORE CONTINUOUS OCCURRENCE OF ALPHABETS, but even this query is retune "APT".) Ask for help to understand this.

    Thank you

    Amrit Pandey


    Hi, Amrit,

    ba1fbc36-dd1f-46af-80EE-a9cedf91e344 wrote:

    I have written 3 applications using regular expressions, but I'm not very clear on the outcome. Looking for help to understand the logic.

    Here are the queries:

    1 > SELECT REGEXP_SUBSTR ('APT-101, BLDG 34, community xyz, XYZ ROAD, BANGALORE - 560066', '([[:alpha:]]+)') ADDR FROM DUAL;

    2 > SELECT REGEXP_SUBSTR ('APT-101, BLDG 34, community xyz, XYZ ROAD, BANGALORE - 560066', ' [[: alpha:]] +') ADDR FROM DUAL;

    3 > SELECT REGEXP_SUBSTR ('APT-101, BLDG 34, community xyz, XYZ ROAD, BANGALORE - 560066',(^'[[:alpha:]]+) ') ADDR FROM DUAL;

    All requests above returns the same result, i.e. 'APT '.

    Question: My understanding is:

    a > the regular expression [[: alpha:]] + represents one or more continuous occurrences of alphabets.

    b > parenthesis (i.e.) - represents the exact mactch

    c > carrot i.e. ^ represents the negation, that is to say. NOT (xyz)

    I can somehow convince myself that regular expressions - ' ([[: alpha:]] +)' and ' [[: alpha:]] +' in the given scenario may return the same string that is 'APT', but in the last query the regex ([[: alpha:]] + is preceded by ^, which according to my understanding should return something that isn't ONE or MORE CONTINUOUS OCCURRENCE OF ALPHABETS, but even this query is retune "APT".) Ask for help to understand this.

    Thank you

    Amrit Pandey

    Be careful.  Cut and paste the exact code you run.

    I do not get the same results for alI these queries.  I get an error message ' ORA-00936: missing expression. "for the 3rd.  Maybe you wanted to have the circumflex accent (^) inside the single quotes, like this:

    SELECT REGEXP_SUBSTR (' APT-101, 34 BLDG, community xyz, XYZ ROAD, BANGALORE - 560066' ")

    , ('^ [[: alpha:]] +')

    ) AS addr

    DOUBLE;

    a > you're right;

    [[: alpha:]] +.

    refers to a group of characters 1 or more adjacent, which are all letters of the alphabet.

    b > an expression can almost always be enclosed in parentheses free.  In other words, almost anywhere, you can use an expression

    x you can also use

    (x)               or

    ((x))                  or

    (((x))) and so on.  Each of them the same meaning.

    This has nothing to do with regular expressions.

    In expressions regular, curved brackets can be used for the Backreferences, for example \1 can be used to return to exactly what corresponded to the subexpression inside the 1st pair of parentheses.  You are not using anything like \1 here, so this backreferences do not apply to this question.

    c > sign means negation only when it comes immediately after [.]  For example

    SELECT REGEXP_SUBSTR (' APT-101, 34 BLDG, community xyz, XYZ ROAD, BANGALORE - 560066' ")

    ", ' [^ [: alpha:]] +"

    ) AS addr

    DOUBLE;

    product

    ADDR

    ------

    -101,

    in other words, the characters 1 or more consecutive which are NOT letters of the alphabet.

    Outside square brackets, the circumflex accent means the beginning of the string.

  • Query Sub behavior strange when using Expressions regular Oracle

    I met a strange "inconsistent" when you use an Expression regular Oracle with subqueries in SQL. Here are some details on how to reproduce what I have observed. We managed to find a solution to this "problem" using a database index; I'm writing this case hoping to better understand why Regular Expressions Oracle do not seem to work in the same way that the older, standard functions integrated as INSTR, SUBSTR, AS, etc..

    Environment settings:
    This test has been done using Oracle XE (GR 11, 2) on 32-bit Windows operating system. For my test, I used the HR schema (which is delivered pre-completed with the installation of this product) with some modifications of my own.

    Make the Test objects:
    create table hr.emp_test as
    select to_char(employee_id) as emp_id_char, employee_id as emp_id,
    first_name, last_name, hire_date
    from hr.employees;
    To illustrate my test, I inserted mixed alphanumeric values and a null value in the column of my emp_id_char for good measure:
    insert into hr.emp_test (emp_id_char, first_name, last_name, hire_date)
    values ('XKCD123','TEST','LASTNAME',sysdate);
    insert into hr.emp_test (emp_id_char, first_name, last_name, hire_date)
    values (null,'TEST1','LASTNAME2',sysdate);
    commit;
    * (1) this request fails once a nonnumeric value is inserted into the emp_test table.*
    with
       sub1 as ( select to_number(emp_id_char) as emp_id, first_name, last_name, hire_date 
          from hr.emp_test  )
    select * from sub1
    where emp_id between 100 and 110
    * (2) this query works OK.*
    with
       sub1 as ( select to_number(emp_id_char) as emp_id, first_name, last_name, hire_date 
          from hr.emp_test where emp_id_char not like 'X%'  )
    select * from sub1
    where emp_id between 100 and 110
    * (3) this query works OK.*
    with
       sub1 as ( select to_number(emp_id_char) as emp_id, first_name, last_name, hire_date 
          from hr.emp_test where instr(emp_id_char,'X',1) = 0 )
    select * from sub1
    where emp_id between 100 and 110
    * (4) this query Fails.*
    with
       sub1 as ( select emp_id_char, first_name, last_name, hire_date
                   from hr.emp_test
                  where regexp_instr(emp_id_char, '[^[:digit:]]') = 0 ),
       sub2 as ( select to_number(emp_id_char) as emp_id, first_name, last_name, hire_date
                  from sub1 )
    select *
    from sub2
    where emp_id between 100 and 110
    
    ERROR:
    ORA-01722: invalid number
    * (5) even down the results of the rational expression of 3rd under the query in sequential processing order also FAILS *.
    with
       sub1 as ( select emp_id_char, first_name, last_name, hire_date
                   from hr.emp_test
                  where regexp_instr(emp_id_char, '[^[:digit:]]') = 0 ),
       sub2 as ( select to_number(emp_id_char) as emp_id, first_name, last_name, hire_date
                  from sub1 ),
       sub3 as ( select emp_id, first_name, last_name, hire_date from sub2 )
    select *
    from sub3
    where emp_id between 100 and 110
    
    ERROR:
    ORA-01722: invalid number
    * (6) that it does not like previous query as well *.
    with
       sub1 as ( select to_number(emp_id_char) as emp_id, first_name, last_name, hire_date,
           regexp_instr(emp_id_char, '[^[:digit:]]') as reg_x 
           from hr.emp_test 
           where reg_x = 0),
       sub2 as ( select emp_id, first_name, last_name, hire_date, reg_x
          from sub1 where reg_x = 0 )
    select * from sub2
    where emp_id between 100 and 110
    
    ERROR:
    ORA-00904: "REG_X": invalid identifier
    Our Solution...
    Add a hint to the query of sup that 'hiding' the result of sub1 in memory. That did the trick. This suspicion resembles only viable workaround for this behavior. Other old built-in functions (INSTR, AS, etc.) an they were automatically following the execution plan (results of cache memory) that he had to use a 'hint' to force with the function of the regular expression.

    The conclusion, which is what I would like to help to understand or explain is that:
    If you create a series of queries/sup queries or inline views, values depend on "regular expression" type built-in sql functions do not seem to stick or maintain when implemented in complex query logic.

    Any idea is appreciated!
    Thank you!

    Published by: 870810 on July 6, 2011 15:47

    870810 wrote:
    I met a strange "inconsistent" when you use an Expression regular Oracle with subqueries in SQL.

    This is the expected behavior and has nothing to do with regular expressions - much less directly (I'll explain later). Main rule: there is no WHERE clause predicate order. Even if you use views, views online, subquery factoring, optimizer etc. can extend your display, display online, a subquery factoring. And it's Optimizer who decides the order of execution predicate unless you use the ORDERED_PREDICATES key. Now, I can explain. Regular expressions are powerful enough but also everywhere in life to pay for it with the higher cost of execution. That's why optimizer decides to apply emp_id between 100 and 110 first and regexp_instr (emp_id_char, "[^ [: digit:]]'") = 0 later.

    explain plan for
    with
    sub1 as ( select emp_id_char, first_name, last_name, hire_date
    from emp_test
    where regexp_instr(emp_id_char, '[^[:digit:]]') = 0 ),
    sub2 as ( select to_number(emp_id_char) as emp_id, first_name, last_name, hire_date
    from sub1 )
    select *
    from sub2
    where emp_id between 100 and 110;
    
    SQL> @?\rdbms\admin\utlxpls
    
    PLAN_TABLE_OUTPUT
    -------------------------------------------------------------------------------------
    Plan hash value: 3124080142
    
    ------------------------------------------------------------------------------
    | Id  | Operation         | Name     | Rows  | Bytes | Cost (%CPU)| Time     |
    ------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT  |          |     1 |    57 |     3   (0)| 00:00:01 |
    |*  1 |  TABLE ACCESS FULL| EMP_TEST |     1 |    57 |     3   (0)| 00:00:01 |
    ------------------------------------------------------------------------------
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
    
    PLAN_TABLE_OUTPUT
    -------------------------------------------------------------------------------------
    
       1 - filter(TO_NUMBER("EMP_ID_CHAR")>=100 AND
                  TO_NUMBER("EMP_ID_CHAR")<=110 AND  REGEXP_INSTR
                  ("EMP_ID_CHAR",'[^[:digit:]]')=0)
    
    15 rows selected.
    
    SQL> 
    

    As you can see, optimizer uses a FULL SCAN to read data from the table and apply emp_id between 100 and 110 which translates TO_NUMBER ("EMP_ID_CHAR") > = 100 AND TO_NUMBER ("EMP_ID_CHAR")<=110. and="" obviously="" it="" fails="" trying="" to="" convert="" xkcd123="" to="" number.="" now="" cost="" of="" instr(emp_id_char,'x',1)="0" is="" lower="" and="" optimizer="" decides="" to="" apply="" instr="" first.="" therefore="" xkcd123="" is="" filtered="" out="" before="" to_number="" is="">

    SQL> explain plan for
      2  with
      3  sub1 as ( select emp_id_char, first_name, last_name, hire_date
      4  from emp_test
      5  where instr(emp_id_char, 'X') = 0 ),
      6  sub2 as ( select to_number(emp_id_char) as emp_id, first_name, last_name, hire_date
      7  from sub1 )
      8  select *
      9  from sub2
     10  where emp_id between 100 and 110;
    
    Explained.
    
    SQL> @?\rdbms\admin\utlxpls
    
    PLAN_TABLE_OUTPUT
    -----------------------------------------------------------------------------------------------
    Plan hash value: 3124080142
    
    ------------------------------------------------------------------------------
    | Id  | Operation         | Name     | Rows  | Bytes | Cost (%CPU)| Time     |
    ------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT  |          |     1 |    57 |     3   (0)| 00:00:01 |
    |*  1 |  TABLE ACCESS FULL| EMP_TEST |     1 |    57 |     3   (0)| 00:00:01 |
    ------------------------------------------------------------------------------
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
    
    PLAN_TABLE_OUTPUT
    -----------------------------------------------------------------------------------------------
    
       1 - filter(INSTR("EMP_ID_CHAR",'X')=0 AND
                  TO_NUMBER("EMP_ID_CHAR")>=100 AND TO_NUMBER("EMP_ID_CHAR")<=110)
    
    14 rows selected.
    
    SQL> 
    

    The bottom LINE: With the help of strings to store non-chaine (numeric in your case) is never a good idea and shows design problems.

    SY.

  • Expression regular slash before?

    I'm trying to use a regular expression to replace all the slashes in a selection.

    I tried the following, my performance desired is 0 m [div] s + s 16.67 m [div].

    var str = "0 m/s + 16.67 m/s";
    var output = str.contents.replace(/[/]/gi,"[div]"); //output "0 m/s + 16.67 m/s"
    

    Thanks in advance for any help is to solve it.

    Hi KuddRoww,

    simply to escape the slash should help (and chain is not necessary: content)

    var str = "0 m/s + 16.67 m/s";
    var output = str.replace(/\//gi,"[div]"); // "0 m[div]s + 16.67 m[div]s"
    alert(output);
    

    Have fun

  • Expression regular/replace - Oracle 7.3

    Hello!

    I have tried SQL regular expression from 10g to Oracle 7.3 functions and it seems that the old version does not have this feature yet.


    'Aaaa, Bbbb'-> 'Aaaa, Bbbb.

    "REPLACE *", [0-9a - Za - z] "* WITH *", "*".




    The chain model is to look for the signs point of punctuation that is not immediately followed by whitespacess so I can replace it with a comma followed by a space.

    No work around for this?

    You can try something like this:

    select replace(replace(yourcolumn, ',', ', '), ',  ', ', ') from yourtable;
    

    Idea:

    Step 1:
    First of all, we replace all the ',' with ','.
    Now every comma will be followed by at least one blank.
    Step 1 is done by inside to replace in my code.

    Step 2:
    Then we replace all ','with','.
    This step removes the double spaces, which were produced by the first step.
    Step 2 is done by outside replace in my code.

    The problem is that this solution represents only white, but not other areas.
    To get rid of the other spaces you can replace them with blanks before step 1.

    Published by: hm on 01.08.2011 05:10

  • Validation of object Expression regular email address

    Hello

    Does anyone know of a regular expression, that I can use to validate an e-mail address field? I use Apex 3.2.

    Your help would be much appreciated.

    Thank you
    ca84
    ^((\s*[a-zA-Z0-9\._%-]+@[a-zA-Z0-9\.-]+\.[a-zA-Z]{2,4}\s*[,;:]){1,100}?)?(\s*[a-zA-Z0-9\._%-]+@[a-zA-Z0-9\.-]+\.[a-zA-Z]{2,4})*$
    
  • expression regular-insert to create a 'new' string expression in the correct position

    I have sample data in table T, and I sample how I want more than data output of the query output.
    with T as
    (
    select 'CREATE OR REPLACE PACKAGE BODY "YYY"."PACKAGEONE" IS' s from dual union all
    select 'Create or REPLACE PACKAGE BODY "ZZZ"."PACKAGETWO" IS' s from dual
    )   
    select REGEXP_REPLACE(T.s, '^.PACKAGE BODY$','(\1)_new',1,1,'i') as s from T;
    /*
    Expected output:
    CREATE OR REPLACE PACKAGE BODY "YYY"."PACKAGEONE_new" IS
    Create OR REPLACE PACKAGE BODY "ZZZ"."PACKAGETWO_new" IS
    */
    All data as a result of model:
    CREATE OR REPLACE PACKAGE BODY "[owner]"."[name]" IS
    Where [owner] can be any string. In the examples of data we have for example XXX and YYY values here.
    And [name] can be any string. In the sample data we have for example values PACKAGEONE and PACKAGETWO here.
    Other parts of the chain is fixed and rest as you see.
    In accordance with the request of expected results should replace substring '[owner] '. ' ' [name] ' '[owner] '. "" [name] _new.

    How can I write this query?
    I think that I have in some way should in regular expression counts the positions of double quotes to achieve the expected result, but I don't know how.
    SQL> ed
    Wrote file afiedt.buf
    
      1  with T as
      2  (
      3  select 'CREATE OR REPLACE PACKAGE BODY "YYY"."PACKAGEONE" IS' s from dual union all
      4  select 'Create or REPLACE PACKAGE BODY "ZZZ"."PACKAGETWO" IS' s from dual
      5  )
      6* select REGEXP_REPLACE(T.s, '"([^.]+\.[^.]+)"','"\1_new"') as s from T
    SQL> /
    
    S
    ----------------------------------------------------------------------------------------
    CREATE OR REPLACE PACKAGE BODY "YYY"."PACKAGEONE_new" IS
    Create or REPLACE PACKAGE BODY "ZZZ"."PACKAGETWO_new" IS
    
    SQL>
    
  • Expression regular replacement

    Hi gurus,

    I have as a result string and replace the string with tags as follows.
     |3 String1 |0 some text  |4 String2 |0 
    
    to
    
     < i >  String1 < /i > some text < b > String2 < /b >
    
    i.e. Want to replace |3 to < i >
                                 |0  to  < /i >      -- First occurrence of |0
                         
                                 |4 to < b > 
                                 |0 to < /b >      -- Second occurrence of |0
    Thanks in advance,
    with t as (
               select '|3 String1 |0 some text  |4 String2 |0' str from dual
              )
    select regexp_replace(
                          regexp_replace(
                                         str,
                                         '\|3(.*?)\|0',
                                         '\1'
                                        ),
                          '\|4(.*?)\|0',
                          '\1'
                         )
      from  t
    /
    
    REGEXP_REPLACE(REGEXP_REPLACE(STR,'\|3(.*?)\
    --------------------------------------------
     String1  some text   String2 
    
    Elapsed: 00:00:00.02
    SQL> 
    

    SY.

  • Search for a string using "Game Plan" or "Regular Expression to Match."

    Hello

    I would use the 'game plan' or the vi "Expression regular game" simply because the products that provide these vi. The result that interests me is the substring 'after '. I want to be able to specify a "substring" and get everything after the substring of the input string. However, I'm getting all confused and/or watered upward when it comes to "regular expressions". Is there a way to create a "regular expression" which acts as a 'substring' to find within the input string?

    The substring is a path of partial directory that contains a colon, backslashes, etc. which are part of a directory path.  If some how the "regular expression" entry must ingnore all special characters and simply to understand if the substring in the string entry and give me 'all things' after the substring in the output of 'after the string.

    Use Regular Expression Match instead of match pattern; It's better.

  • Changeparticular the characters of a string using regular expressions...

    Hi all
    I'm writing a function using the function of expression regular oracles REGEXP_REPLACE but I could not succeed until now.

    My problem is as follows, I have a text in a column say "Scott Sdfdfs Sdfd" I want to replace all the s and S with X characters and make the text looks like "XdfXdf XdfdfX Xdfd".

    It is possible by using regular expressions in oracle?
    Can you give me some clue?

    Thank you
    select
      regexp_replace('sdfsdf Sdfdfs Sdfd',
                     's|S', 'X') Replaced
    from dual;
    
    REPLACED
    ------------------
    XdfXdf XdfdfX Xdfd 
    
  • Set-search-data-hiding-rule-prop-dn-regular-expressions setting targets

    Hello. I'm trying to put in place a masking rule 6.3 DPS data. I want to have the data masking rule apply to any DN that ends with o = ny, c = us. I tried to adjust the target-dn-regular-expressions to ' o = ny, c = us$ '. I thought that if DPS used regular expression match, the $ at the end should serve as an anchor for this channel. But the rule is not fired. I proved it by assigning the expression regular votes to zero and then the target dns to exactly match the dn I'm back. Anyone know what I need to put in the phrase correspond to what I want? Thank you

    Hello

    Regular expressions must comply with the Java regular expression specificationa, available on [http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html]

    For example, the regular expression (. *) c = us, o = ny filters out all o = ny, c = us tree.

    Hope this helps

    Sylvain

  • ignoring filesystems in bb-dftab

    I have an Oracle server that works 100% on all data systems on a consistent basis due to being very large file systems. The drive test is essentially be lifted under an ack 9999 minute all the time that we miss the alerts for other file systems we need to know. Is it possible to ignore these Oracle FS so we can get alerted properly? Here's what I've tried and the results.

    1. remove the bb-dftab FS gave rise to the FS jump with the default value of 90/95 monitors

    2. change the values of orange/red to 101 gave place to the BBDISPLAY griping on the invalid values in the configuration file and the monitor continued to display in red

    3 remove the Red value of the config led BBDISPLAY griping on the wrong number of arguments and the monitor has continued to appear in red.

    As for the BB version, I have no idea it's old planned NCR of stuff.

    in etc/bbsys.sh, try DFEXCLUDE-settting to a value (s) (it can be any expression regular egrep, so several value separated by ' |' can be specified) to exclude file oracle systems.

  • Column/data varchar but req number formatting when digital.

    Hello

    I wrote some sql to retrieve data from our Oracle database.

    Number formatting is a bit unfortunate.

    The column reads:

    1 000 000

    0.010

    1 000

    0.0009

    9999999.000

    -

    null

    > NWG

    If its not all of the numbers, but if it is a number, I need to correctly format i.e.

    without decimal places if they are just led 0

    I hope that there is a regular expression that I can use to format numbers ignoring the character entries.

    Any suggestions?

    Hello

    Whenever you have a question, please post a small example of data (CREATE TABLE and only relevant columns, INSERT statements) for all of the tables involved and the accurate results you want from this data, so that people who want to help you can recreate the problem and test their ideas.

    Explain, using specific examples, how you get these results from these data.

    Always say what version of Oracle you are using (for example, 11.2.0.2.0).

    See the FAQ forum: Re: 2. How can I ask a question on the forums?

    What do you mean by "if it's a number"?  The following could all be considered numbers:

    • -1
    • -1.2E + 3
    • $9,987,54
    • 123 456,7
    • 3/4

    Depending on what you consider a 'number', you can use expressions regular, perhaps combined with other string manipulation functions, like to TRANSLATE.

    You can consider a function defined by the user who tries to convert it to a NUMBER, but never to raise an error.  See How to determine if a Varchar2 string has characters from a to z?

    Which type of formatting you want for the numbers?  You said that you don't want to end ' 0 decimal, but how about a trailing decimal point?  When you post the sample data and results, examples of all individual cases, you want to manage.

    You may need TO_CHAR and then some channel, for example, RTRIM or REGEXP_REPLACE mainpulation functions.

    As you realize you probably now, it's a really bad design.  You let people in chains that may or may not represent the numbers, then, much later, trying to guess the whehter they meant it to be number, and if so which COMP.  Guess, isn't a very good way to solve problems.  The person who knows the data if it is a number or not - make him tell you at the point where it enters the number.  For example, instead of having 1 VARHCAR2 column, you may have 2 columns (a VARCHAR2 and a NUMBER) and a CHECK constraint that requires at least 1 of them to be null.

  • validateEmailAddress method inStoreProfileTools

    Hi all

    I am trying to understand how many characters will be the method validateEmailAddress of the StoreProfileTools of the ATG OOTB accepts as valid email address by default?

    I tried sending 80 characters as input an email address, of course I know that nobody will have 80 characters length email address but I wanted to remedy for the purposes of the requirement of the customer.

    All entries on this is appreciated.

    Thank you

    REDA

    There should be no limit superior character for validation. You can try to pass the email address valid more of 80 characters to this method, and it should work.

    He's trying to match the email address to the expression regular pattern, but do not think that there is no check of limit superior character. Thank you.

  • Split a string of html into multiple lines

    I'm trying to convert a string into several lines using REGEX, can someone tell me if this is achievable using expressions regular oracle

    WITH qry AS)

    SELECT ' < p > < /p > < p > two < /p > < p > 3 < /p > ' Str

    OF THE DOUBLE

    )

    SELECT

    -regexp_replace)

    -regexp_replace)

    regexp_substr (str,

    ' [^ < (/?) p >]. (*', 1, LEVEL)

    (-, '< p >', ")

    (-, "< /p >", ")

    AB

    OF qry

    CONNECTION OF LEVEL < = LENGTH (regexp_replace (str, ' [^ < (/?) p >]. * "")) + 1

    ;

    Output current:

    1 a < /p > < p > two < /p > < p > 3 < /p >

    2 (null)

    3 (null)

    4 (null)

    Expected results:

    1 a

    2 two

    3 three

    user2022369 wrote:

    You are right that I excluded NULL, 8 rows out put to our example looks correct to me

    The result included "two" because its locked up in one of our separators

    '

    I'm not sure of any character that never appear in str

    Thank you

    Something like:

    WITH qry AS)

    SELECT "Hello World

    one

    a header
    a text or
    here goes

    two

    more text here

    three ' str

    OF the double

    )

    SELECT THE LEVEL,

    REGEXP_SUBSTR)

    Str,

    '(())? (.*?) (()|$)',

    1,

    LEVEL,

    'I,

    4

    ) ab

    OF qry

    CONNECT BY LEVEL<>

    Str,

    '(())? (.*?) (()|$)',

    1,

    'I '.

    )

    /

    LEVEL AB
    ---------- --------------------------------------------------
    1 Hello World
    2 a
    3 a header
    a text or
    here goes
    4 two
    5 more text here
    6 three

    6 selected lines.

    SQL >

    SY.

Maybe you are looking for

  • Tap to hear the time function does not work

    I can't tap to hear when mickey or Minnie faces to work I have the latest versions of software on the phone and watch I toggled the function works and have re-matched my watch to my phone, but it still does not.

  • Object to detect and record the image of the object

    Hello I'm trying to detect the object and save the image. However, the programming can sometimes do as request and sometimes impossible. Someone know how to ensure that this programming is stable? My programming is attached. It is using pixels to det

  • I am running vista 32 bit and I think the upgrade to windows 7

    I'm running vista 32 bit and I think the upgrade to windows 7, I don't know if I choose the upgrade option, I can keep all my files and all the software that I installed on my laptop but that include photos, video and music and send the parameters I

  • PHOTOSMART PLUS B209a-m: PHOTOSMART PLUS B209a-m does not print the data entered.

    Printer was working fine, but recently had a few power outages in 48 hours.  After the second blackout, we noticed that if we tried to copy and print something, what we would have would be a picture or a diagram of a post, for example I tried to prin

  • hp7350 print Mac 10.6.8

    My HP 7350 is connected to my MacPro 10.6.8 with a USB cable.  When I send a document or photo to print, it prints a line then starts printing over the previous line is gradually deteriorating and printing only about 1.5 inches on paper it stops and