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

Tags: InDesign

Similar Questions

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

  • Why is-2 slashes after domain name now, when you publish a live site after the new update with Muse? Post also after the site he has these 2 slashes before 'index.html '.

    There are 2 slashes after domain name now, when you need to publish a live site after the new update with Muse?

    -It was always a slash after the domain name. And if BC publication the

    site - it has also these 2 slashes before "index.html" - is this correct? - or something wrong?

    slash.png

    Hi erinb61521593,

    I did some tests at my end and can confirm that it is a known problem with the latest version of Muse but I advise you to choose the option with the / / at the time of release as it will download your site in good folder on the servers of BC (that points to your domain name) and after publishing the site if you go to the url with single / it works perfectly.

    We already noted this problem with the developers of muse and I don't know that it will be fixed in the next version of Muse.

    Feel free to reply to this post, just in case I missed something or if you have any other doubts about this.

    Kind regards

    Vivek

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

  • 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

  • Values of expression el solve before making

    Hi all

    IM using Jdeveloper 11.1.1.7.1.

    I have a requirement in which Im trying to get to set values of UIComponent on a jsff before the page is rendered.

    I am able to access the UIComponents and obtain expressions of the value using a pagephaselistener EL, but Im having problems resolve EL expressions at this stage. I created my phaselistener be called before the phase renderResponse.

    Could someone tell me:

    1. how this could be done?

    2. more than information on the moment in the lifecycle el expressions are resolved.

    Thanks in advance,

    David

    EL expression is then evaluated not before rendering.

  • 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>
    
  • Queries related to Microsoft Expression Encoder 4 before you buy

    Hi team,
    I have a requirement to convert a video file in Windows Media format and the flv format and changes in the resolution, the video bit rate and audio bit rate of the file source video.
    I evaluated this is the free version (Microsoft Expression Encoder 4) but it seems that it doesn't support .flv as output even after the installation of the package of Community code combined as suggested in some msdn articles.
    Microsoft Expression Encoder 4 support flv formats after the installation of a codec? If Yes please let me know the dependent component to convert video files to flv format.
    Please let me know if I buy now then what kind of support can I wait especially after sales of the post.

    Thank you
    Delumeau

    Hello

    Microsoft Expression Encoder 4 is not supported in these forums. Please could you ask your question again in this forum dedicated to Microsoft:

    http://social.msdn.microsoft.com/Forums/en-US/encoder/threads .

    Thank you.   :)

  • How to get my Outlook Express, I had before the crash and restore?

    My computer crashed so bad I had to click on the f10 key, but it did a restore and I lost my Outlook express, even my e-mail provider windstream has been lost and now, they can't recognize my old login, can't my email even with the same settings as I had typed out after that I started usuing Windstream in 2010 my address book is gone! can not get my address book! My new outlook Express6 has a released check it out, but when I click on it nothing happens. I used it even though my intention was not to send an e-mail, I am a bad speller! I'm very confused with my old outlook Express and the address book. The news is very disappointing!

    According to Bruce, you will need to search for *.dbx to locate the directory of dbx files.  Make sure that you have configured to display the hidden files and folders and do not hide the extensions of the types of files known as control panel | Folder options | View.  Also when research conduct an advanced search and include files and folders hidden in the advanced search parameters.  The address book is a wab, so also the search for *.wab file.  When find you them, then use the file | Import | Messages and files. Import | Address book to get back them.  See also www.oehelp.com/OETips.aspx#4 and www.oehelp.com/backup.aspx for background information.

    If you have formatted the drive when you did reinstall it, then the old files have disappeared.  My DBXpress program has a record feature which can recover some of the lost messages (see www.oehelp.com/DBXpress/).

    To the properties of your account, you need to collate Windstream or check their Web site for the correct settings.

    Steve

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

  • DW error? Links created in CS4 to put a slash before the name of file in html.

    To create a link I select the text and then choose make link to a html file that is at the same level. When I go to the code, the link has been established, but the new link has a slash in front of him.

    For example: < a href = "/ test.html" > link < /a > test

    I have received no support from the company on this issue.  I repeated the process a variety of ways and always DW puts a slash in front of the file name.  So, I have to go and delete the forward slash.

    Shouldn't they be fixing this problem? Or does anyone know of a fix?


    From what I understand of your screenshots, Dreamweaver inserts your links properly.

    A slash at the front of a link means the site root.

    searches for a file named test.html in the level of the root of the site. If this file does not exist at the root level, then the link is broken.

    If the test.html file is one folder down then, if the / is included at the front of a link, the link will not work unless the name of the folder is included in the link

    If, as you say, the file that you want to link is in the same folder, then you need a parent to the Document link.

    Thus, in the dialog box select the file specified in SelectFileatSameLevel.jpg, change Relative to the Root of the Site to read Relative to the Document.

    Your link will be inserted in the

    Your link does now work locally and remotely?

    Otherwise, files related, who are at the same level, in the same directory or in different directories?

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

  • How to extract the value of a tag XML using regular Expressions

    We get a response XML from a WEB SERVICE.

    I convert it to VARCHAR2.

    Now, I want to get the real answer that is inside the tag of the response.

    I tried this:

    DECLARE

    V_1 VARCHAR2 (30000): = ' < soap: Body > < ns:ProcessArgusFeedsResponse xmlns:ns = "urn: PegaRULES:SOAP:ArgusToPegaFeeds:Services" > ' |

    '< response > good < / answer >< / ns:ProcessArgusFeedsResponse > < / soap: Body > ';

    v_response VARCHAR2 (100);

    BEGIN

    DBMS_OUTPUT. PUT_LINE (V_1);

    v_response: = REGEXP_SUBSTR (v_1, ' / < >(.+?) < \/Response > answer /');

    dbms_output.put_line (v_response);

    END;

    It does not work.

    Any help would be greatly appreicated.

    Hello

    user12240205 wrote:

    We get a response XML from a WEB SERVICE.

    I convert it to VARCHAR2.

    Why?  XML has its own native ways of analysis; Why not use them?

    If you use regular expressions, then REGEXP_REPLACE, as shown above, is a good option in Oracle 10, but starting in Oracle 11.1, you can use REGEXP_SUBSTR like this:

    REGEXP_SUBSTR (v_1

    , '(.+?)'

    1

    1

    NULL

    1

    )

    The 6th argument is like a backreference; "He tells REGEXP_SUBSTR did not return to the entire organization, but only the part inside the 1st left '(' et correspondant à sa droite).

    The '?' to make it non-greedy is necessary only if v_1 can contain more than one response.

    Now, I want to get the real answer that is inside the tag of the response.

    I tried this:

    DECLARE

    V_1 VARCHAR2 (30000): = "" |

    'Good';

    v_response VARCHAR2 (100);

    BEGIN

    DBMS_OUTPUT. PUT_LINE (V_1);

    v_response: = REGEXP_SUBSTR (v_1, ' /(. +?)) <\ esponse="">/');

    dbms_output.put_line (v_response);

    END;

    It does not work.

    That's because it's looking for a slash ("/") before the '' tag and another after the ' tag.

    The backslash ("\") is not necessary here, but it is not nothing wrong.

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

Maybe you are looking for

  • I can't save bookmarks in the folder I want, they all go to "recent bookmarks".

    I have Firefox 29.0.0.5224 favorite icon only gives me the option of bookmarking the page for that I am. For this I have to click on the 'star '. This saves a bookmark in the recently bookmarked folder. Very nice, wonderful, but long I had my favorit

  • Satellite Pro NB10 limited wifi connection

    I use Satellite NB10 Pro with version 1.20 of the BIOS and windows 64-bit of 8.1. I have trouble with several times the limited wifi connection. When I remove the driver and reinstall it, it works again. Pilot already updated, but keeps same problem.

  • Satellite M70-340: Question about the warranty if I buy in Russia and move to Australia

    I would buy the Satellite M70-340 laptop here in Russia. Next month I'll move to Australia. What the warranty in this case? Will I be charged if problems occur?How can I recognize a laptop that is officially sold (= I mean legally delivered and comes

  • ET3500 rounding error driver

    Hello I am currently working on a project involving a Eurotherm 3508 instrument. I control this instrument using the driver et3500 (http://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=FA24DAC594CD4665E0340003BA7CCD...), but I have a

  • Multiplayer FSX: my microphone does not work

    Hi all I have trouble getting one of my MICS to work with FSX multiplayer. They work with all the rest. They are usb. Any ideas would be appreciated. I tried SHIFT + CAPS and CAPS and made sure I was on the right lanes.