Use Regex package to solve HTML coding

Hi,
I have got around 1000 HTML files. Now suddenly the contents within the <body> and </body> tags needs to be changed. Please suggest what will be the regular expression for doing the same using the java.util.regex package

What do you mean by "the same"? What shall be replaced? Everything within the body tag? Show us what you got so far, and someone may have an opinion.

Similar Messages

  • Using a package for solving many mutating tables.....

    Hi,
    I need to solve more than one cases of mutating tables .. following the 'traditional' way described in:
    http://asktom.oracle.com/tkyte/Mutate/index.html
    For these cases , do you recommend me to use an individual package for each case ... or one to cover all cases (with different variables and PL/SQL tables... of course)....???
    Many thanks ,
    Simon

    No , I meant that there are cases on different
    tables....Then there is no other possibility but to create different packages.
    When you write "use api's"... can you give some more
    details....?????I mean to have a package to do all your dml in nice clean functions and procedures like procedure hire_employee, procedure fire_employee, function salary_including_commission and so on. Your procedures will include logic to validate all business rules. Then grant execute privileges on this package (api) to the users that should be able to work with employees and revoke all DML privileges on the table from anyone, even revoke the "CREATE SESSION" privilege from the schema owner when done installing to prevent direct access on the table.
    Now every DML action will be through your api and it's not possible to bypass constraint validation.
    Regards,
    Rob.

  • Is it possible to send emails using the package SendMailJPKG in HTML format

    Hi
    I am trying to find out if there is a way to send an email using the SendMailJPKG in HTML format.
    I would also want to add an image in the signature of the email.
    Please help.
    regards

    We are in 9i, should be probably UTL_SMTP. please verify if UTL_MAIL will work on 9iUTL_MAIL is new feature in V10.
    Install a V10 DB, then invoke UTL_MAIL via dblink from V9 to V10.
    Attachments can be done in V9, but it is a non-trivial effort to do so.
    I suspect that GOOGLE can find a working example.

  • Help needed with regex package

    Hi,
    I need help about using regex package in the following way.
    a String/CharSequence should be there which will be given to the Pattern.compile(REGEX) method.
    I need the REGEX sequences according to the strings below
    1) From: "*" <*@*> :: Here * is for any number of charecters
    2) we will have some file names I want only those files which end with .txt format.
    Please help me in writing the regular expressions for the above criteria.

    String regex = "From: *[^<]+<[^@]+@[^>]+>";would you need to escape out *'s? forgot if you need to escape quantifiers
    and for the file you would want something like
    "(.*)\.txt"check out
    http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html

  • Using the java.util.regex package

    I am trying to use the regex package to grep out portions of a string that match a regular expression. Some code from my class
        String fileList = "1_tmp.txt 2_tmp.txt 3_tmp.txt 1_inpt.txt 2_inpt.txt 3_inpt.txt 1_out.txt 2_out.txt 3_out.txt";
        String regex = "[0-9].*_out.txt"  ;
        Pattern pat = Pattern.compile(regex);
        Matcher m = pat.matcher(fileList);
        boolean succ = m.find();
        for (int i =0; i< m.groupCount(); i++) {
            System.out.println(m.group(i));
        }I was expecting to see
    1_out.txt
    2_out.txt
    3_out.txt
    This doesnt work this way, nothing gets printed out. Anybody has any idea what is wrong here?
    I am basically trying to get the same functionality as
    ls | grep "*_out.txt"
    Also is there any way to do a OR in the regular expression, like
    match [0-9]*_out.txt OR [0-9]*_out.txt
    Thanks
    -kn

    I don't see a difference in your OR, but look in the Pattern JavaDocs under logical operators.
    Second, groups are not appropriate in your situation. You have a single pattern which you wish to repeatedly find. Groups are used when you wish to pick out one subsection of a matched item. For example, a pattern dealing with a phone number might have three groups, the area code, the prefix, and the rest.
    Still, group 0 is by definition the entire matched item, so if your pattern was right, it should have worked.
    I think the critical piece is the ".*" section. * is a greedy marker and combined with the 'any chacter' marker will eat as many characters as it can. In this case, it's probably eating the rest of the string, which leaves nothing left for the "_out.txt" part of the pattern. Try using the *?, which is a reluctant marker and will basically look ahead in the pattern and eat the minimum number of characters it can.

  • Reading html data & uploading a file in single html form using htp package

    Hi
    I have designed a html screen using htp package in which i have few text items and file upload button. I have to validate all forms data like text items and check box elements and upload file to unix. I am using java script for file validations and cgi script to upload file. With this I am able to either read form data or upload file but not both.
    At a time I want to insert a record to database with html form values and upload file to unix with htp package. Please suggest how can I read html form data + uploading a file to unix simultaneously in a single htp procedure.
    Thanks,
    Pradeep

    Have you ever considered using Application Express (APEX)?
    Oracle Application Express (APEX)
    Sounds like you're going the long way around to create a web based application.

  • Can i use HTML coding in oracle alerts

    Hi,
    I have a doubt in oracle alerts.
    can i use html coding in oracle alerts.
    If so can anyone please help me out this.
    Thankig you,
    Regards,
    RR

    hi vingorius ,
    No you cant include html but u can use variables
    To add a variable in a text message to provide context for the iBot attachment
    1. Click the following option:
    If sent as attachment, include this text
    2. Type the text into the text box with a session variable, a repository variable, or a presentation variable using the syntax shown in the following table:
    Variable Type
    Syntax
    Repository @{Variable_Name}
    Session @{NQ_SESSION.Variable_Name}
    Presentation @{Variable_Name}
    For example, Dear, @{NQ_SESSION.Variable_Name}, here is your personalized Weekly Sales Territory Update.
    NOTE: If you want to use the @ character, you need to precede it with the \ (back slash) character to separate it from the variable syntax. For example, Dear @{NQ_SESSION.DISPLAYNAME}, \@ New York, appears as Dear Joe Smith, @ New York.
    Source : BI Guide
    Thanks,
    Saichand.v

  • How to check special characters in java code using Java.util.regex package

    String guid="first_Name;Last_Name";
    Pattern p5 = Pattern.compile("\\p{Punct}");
    Matcher m5 =p5.matcher(guid);
    boolean test=m5.matches();
    I want to find out the weather any speacial characters are there in the String guid using regex.
    but above code is always returning false. pls suggest.

    Pattern.compile ("[^\\w]");The above will match any non [a-zA-Z0-9_] character.
    Or you could do
    Pattern.compile("[^\\s^\\w]");This should match anything that is not a valid charcter and is not whitespace.

  • Parse html (a href) using regex

    Hello,
    i would like to extract all the urls from a website that are included in < a href=" parse string">
    I have already the regex which is
    String regex = "< *a.*href *= *['|\"]";
    May you please advise me which method in Pattern or Matcher classes shall i use in order to take as output
    *only* the url inside the " " marks?
    I have already tried end and start methods which return the indexes, but i don't get the desirable result.
    Thanks, in advance
    P.S.Also, i have already tried to use HtmlParser but i prefer to use regex cause i found a difficulty in it.

    Please continue in your original thread.
    [http://forums.sun.com/thread.jspa?threadID=5363751]

  • Problem in Using Utl_Http package

    Hi to all,
    I'm trying to send the sms(Short Message Service) using utl_Http package. When I'm trying to run a sql statement like
    SELECT utl_http.request('http://www.oracle.com/index.html') FROM dual
    I'm getting an error message like this.
    The following error has occurred:
    ORA-29273: HTTP request failed
    ORA-06512: at "SYS.UTL_HTTP", line 1577
    ORA-12545: Connect failed because target host or object does not exist
    ORA-06512: at line 1
    Pls help me to solve this problem.
    Regards,
    Alok Dubey

    Thank you for ur reply. Infact my database was not able to access the internet. currently, it is working fine.
    I'am using this code. It's works well.
    CREATE OR REPLACE PROCEDURE Send_Sms_Http
    AS
    text_str VARCHAR2(5000);
    V_Message VARCHAR2(200) := REPLACE('This is a DEMO SMS sent to u on '||TO_CHAR(SYSDATE,'DD/MM/RRRR HH12:MI:SS AM'),' ','%20');
    text_sms VARCHAR2(5000) := 'http://hapi.smsapi.org/SendSMS.aspx?UserName=xxxx&password=xxxx&MobileNo=xxxx,xxxxx&SenderID=xxxx&CDMAHeader=xxxxx&Message='||V_Message;
    BEGIN
    text_str := utl_http.request(text_sms);
    Dbms_Output.Put_Line('text_str = '||text_str);
    EXCEPTION
    WHEN OTHERS THEN
    Dbms_Output.Put_line('Error in sending the message'||SQLERRM);
    END;
    Regards,
    Alok Dubey

  • Without regex package

    How can I check a string that belongs to a grammar or not without importing regex package in my java program.
    If Anybody have good idea please give .

    I am planning to developing an editor tool for java programming because of my interest. Before that I want to learn lexiacal analyzing in java programming. So I wrote a token recognizing code in java ( It will recognize keywords, identifier, constants, operator, special symbols).
    For that I used java.util.regex package( Pattern and Match) classes. But I got Lot of bugs and less feasibilty in my coding. It is not working properly. Sometimes it recognize a keyword as a identifier sometimes as a special symbol. So I want to know Is there any possibilities to write a token recognize program without using a regex package.

  • Error while sending a mail using UTP_MAIL package in Oracle 10g

    Hi,
    We are using UTP_MAIL package to send a mail from Oracle 10g.We have follwed the following steps ...
    SQL> connect sys/password as sysdba
    Connected.
    SQL> @$ORACLE_HOME/rdbms/admin/utlmail.sql
    Package created.
    Synonym created.
    SQL> @$ORACLE_HOME /rdbms/admin/prvtmail.plb
    Package body created.
    SQL > alter system set smtp_out_server = '<mail_server_ip:25>' scope =spfile;
    System altered..
    Now we try the code
    begin
    utl_mail.send(
    sender => 'sender's mail',
    recipients => 'receiver mail',
    CC => 'optional',
    subject => 'Testing utl_mail',
    message => 'Test Mail'
    end;
    But we get the following error...
    ERROR at line 1:
    ORA-29278: SMTP transient error: 421 Service not available
    ORA-06512: at "SYS.UTL_SMTP", line 21
    ORA-06512: at "SYS.UTL_SMTP", line 97
    ORA-06512: at "SYS.UTL_SMTP", line 139
    ORA-06512: at "SYS.UTL_MAIL", line 405
    ORA-06512: at "SYS.UTL_MAIL", line 594
    ORA-06512: at line 2
    We also tried connecting to the mail server through telnet .But it is not getting connected..
    Please help us to solve the issue.

    From your own posting you may have the clue, if you try to access your mail server through telnet and it is not successful, it means the service is down or there are networking issues.
    On pre 10gR2 versions there was a bug 4083461.8. It could affect you if you are on 10gR1
    "Bug 4083461 - UTL_SMTP.OPEN_CONNECTION in shared server fails with ORA-29278 Doc ID:      Note:4083461.8"
    This was fixed on 10gR2 base and on 9.2.0.8.0
    ~ Madrid

  • How to delete data from a file using IO package

    Hi All,
    i am trying to remove some content of the file.
    this content is not at starting of file not even at end of file.
    can anybody tell me how can i delete number of lines from file using IO package.

    iam having some data in text file .ex:in flowrist.txt
    12/5/07,500,300,6000 like many set of datas are
    there.In these if i want to delete the data based on
    the date which i specified.How to do this specific
    deletion?You need to open a stream to read in the file and then use the indexOf method provided in the Sting class to check if the line contains the date or whatever String you are looking for, if so then skip that line and store or re-write the lines you wish to keep, as well as some extra lines you may wish to add.
    Take a look below at this example found on Google.
    http://www.java-tips.org/java-se-tips/java.io/how-to-read-file-in-java.html
    The above read a file line by line and prints it to console. You should be able to modify this, instead of using System.out to print the line you should use index of to check the lines for a date/String. Index of return -1 if the String you specify is not in the line you parse.

  • Error while using DBMS_XMLSave package...

    Hi All,
    I am using DBMS_XMLSave package and when I try to execute the following code, it is giving me error "Java call terminated by uncaught Java exception:"
    I am executing following code ....
    declare
    insCtx DBMS_XMLSave.ctxType;
    begin
    insCtx := DBMS_XMLSave.newContext('scott.emp');
    end;
    I am getting following error ...
    ERROR at line 1:
    ORA-29532: Java call terminated by uncaught Java exception:
    java.lang.ExceptionInInitializerError
    ORA-06512: at "SYS.DBMS_XMLSAVE"
    ORA-06512: at line
    Please help me to overcome the problem....
    Thanx in advance ,
    Yogesh

    Found maybe an applicable reference...
    On http://publib.boulder.ibm.com/infocenter/wasinfo/v4r0/index.jsp?topic=/com.ibm.support.was.doc/html/Java_2_Connectivity_(J2C)/1163246.html
    it says:
    * Application code is missing a setXXX method call somewhere.
    * There might be a problem in the Oracle JDBC driver code.
    If the latter is the problem than you should or try a different JDBC driver or (which is probably the best solution anyway) create an iTar with Oracle support via metalink.oracle.com
    Other references can also be found on the internet when using google which could be applicable. Search on keywords: "Missing IN or OUT parameter at index"
    Message was edited by:
    mgralike

  • Error while using Mail Package for dynamic email address - XMLScanException

    Hi All,
        i am trying to implement File_to_Mail Scanrio. Here i am using mail package stuff to make use the dynamic mail Id's. i am following the blog /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address. i have finished all the settings as per the blog but it throwing the following error
    failed to send mail: com.sap.aii.messaging.util.XMLScanException: expecting start tag: Mail, but found Mail at state 1
    Please help me to resolve this error.
    Thanks in advance
    -Siva
    Edited by: Siva Ram on Jan 18, 2008 7:43 AM
    Edited by: Siva Ram on Jan 18, 2008 7:43 AM
    Edited by: Siva Ram on Jan 18, 2008 7:44 AM
    Edited by: Siva Ram on Jan 18, 2008 7:44 AM
    Edited by: Siva Ram on Jan 21, 2008 5:59 AM

    Hi Siva
    check with these threads discuss the same XMLScanException
    Mail adapter fails when using Mail Package Format
    Error in E-mail Adapter - Message protocol XIALL
    Mapping Error with mail package
    Error in Mail Adapter
    See the below links also
    /people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit
    /people/michal.krawczyk2/blog/2005/11/23/xi-html-e-mails-from-the-receiver-mail-adapter
    /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address
    /people/sravya.talanki2/blog/2005/08/18/triggering-e-mails-to-shared-folders-of-sap-is-u
    /people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure
    /people/michal.krawczyk2/blog/2005/11/23/xi-html-e-mails-from-the-receiver-mail-adapter
    Error in Mail Adapter
    Mapping Error with mail package
    Regards
    Abhishek

Maybe you are looking for

  • My iPhone5 no longer detects my HP OfficeJet Pro 8600 Pro ePrinter after I updated to IOS7

    My iPhone5 no longer detects my HP OfficeJet Pro 8600 Pro ePrinter after I updated to IOS7. Is anyone else experiencing this? I was able to print from my iPhone up until I updated to IOS7.  Is there a fix for this?  Thanks!

  • Bookmarks not working in iBooks author

    I am unable to create a bookmark in iBooks author. The "+"-sign in the bookmarks pane of the inspector is faded/unclickable when I select an element on one of the pages (figure, text box, image etc.). I have been reading up on solutions and workaroun

  • Migrating subscribers from Unity 4.2 to Unity 7.0

    I am upgrading my Exchange 2003 environment to Exchange 2010. I have Unity 4.2 with about 340 subscribers integrated into Exchange 2003. I have successfully installed Clean install of Unity 7.02.ES with Exchange 2010 in my lab according to the recent

  • Source system connection for DB connect.

    hi experts presently the data is available in sql server(legacy system).so we have to extract data from sql server to bw server through DBconnect.tell me the procedure for how to connect sql server to BW server through DB connect.

  • Call another component on fire plug..

    Hi All Assume the following set up - Comp A (view1) and Comp B (view2). I enter some data in view1 and it should be displayed in view2. Via the Interface controllers, I have done the relevant mappings so that data of Comp A (view 1) can be accessed i