Delete HTML between tags

I need to know how to delete all the html code between the </head> and the <h1> for all the files of a site. I know i will use a wilcard in the find and replace, but have no idea how to do this. All the code between those tags is not identical or I would just use basic find and replace. Please help thanks.

The Find/Replace function allows the use of regular expressions (checkbox at the bottom right). The find string would look something like this:
"</head>[a-zA-Z0-9\ \n]*</h1>"
to search for all letters and numbers, spaces and newlines.If you have other characters in between, you will need to include them in the list as well.
The replacement string would be
"</head><h1>"
Without quotes.Googling regular expression will bring up a lot of help.
Barry

Similar Messages

  • Html "img" tag impossible to delete

    Hi!
    I process .html files, and I want to delete all the tags. I do it with .replaceAll("\\<(.)*?\\>", " ")
    It is rather successful, and all of the tags are deleted except for img tags. What could be a reason?
    Thanks!

    For these problems, MULTILINE mode, which matches \nx with $^, is irrelevant.
    You should consider using DOTALL mode for matching a regexp '.' with '\n'.
    And you should consider which you are going to choose between greedy mode and
    reluctant mode.
    import java.util.regex.*;
    public class TagRgx{
      public static void main(String[] args){
        Pattern patt1 = Pattern.compile("<[^>]*>");
        Pattern patt2 = Pattern.compile("<.*>");
        Pattern patt3 = Pattern.compile("<.*>", Pattern.DOTALL);
        Pattern patt4 = Pattern.compile("<.*?>");
        Pattern patt5 = Pattern.compile("<.*?>", Pattern.DOTALL);
        String html
    = "This is <b>a test</b>. <img src=foo.jpg\nwidth=1 height=1>. End test.";
        System.out.println("1: " + patt1.matcher(html).replaceAll(""));
        System.out.println("2: " + patt2.matcher(html).replaceAll(""));
        System.out.println("3: " + patt3.matcher(html).replaceAll(""));
        System.out.println("4: " + patt4.matcher(html).replaceAll(""));
        System.out.println("5: " + patt5.matcher(html).replaceAll(""));
        System.out.println();
        String h2
    = "Begin<!-- This comment doesn't terminate here > but rather here -->End";
        System.out.println("1: " + patt1.matcher(h2).replaceAll(""));
        System.out.println("2: " + patt2.matcher(h2).replaceAll(""));
        System.out.println("4: " + patt4.matcher(h2).replaceAll(""));
        System.out.println();
        String h3 = "Begin<meta name=\"Random\" text=\"Look at the >\">End";
        System.out.println("1: " + patt1.matcher(h3).replaceAll(""));
        System.out.println("2: " + patt2.matcher(h3).replaceAll(""));
        System.out.println("4: " + patt4.matcher(h3).replaceAll(""));
        System.out.println();
    }

  • Problem in html:link tag in struts

    hi every body i have a problem i have to pass two dynamic variable to next page using html:link tag how can i send it
    for example
    <a href = "editEmp.jsp?id=<%= empSno %>&&delete=no"> Edit </a>
    should be coverted into <html:link >and i want to pass 2 parameters to next page how can i do can anybody help

    i have used forward only but how to passs variable dynamically in forward for eaxmpleeee
    i am retreving records from database
    emdID name desig
    1 suresh PM edit
    2 ram PL edit
    when user clecks on link of edit of suresh then i should pass controll to edit page with his empID an parameter............
    i have done this prevoiusly by href tag like
    while (rst.next()) { %>
                        <tr>
                             <% empSno = rst.getInt ("ID");%>
                             <td align = "left"><%= empSno %></td>
                             <td align = "left"><%= rst.getString ("empno") %></td>
                             <td align = "left"><%= rst.getString ("empname") %></td>
                             <td align = "left"><%= rst.getString ("desig") %></td>
                             <td><a href = "strutsEx/ch05/editEmp.jsp?id=<%= empSno %>&&delete=no"> Edit </a>&nbsp&nbsp&nbsp&nbsp<a href = "editEmp.jsp?id=<%= empSno %>&&delete=yes"> Delete </a>
                             </td>
                        </tr>
    now i want to use html:link action in place of HREF can u help me plzzzzzzzzzz

  • ER: HTML Applet tag syntax warning - or HTML syntax checker for JDEV.

    Hi,
    I just spent ages (an hour or two) debugging an applet and it turned out that I had left a comma "," out of my 'archive=..' parameter of the 'applet' tag in the HTML :-(.
    E.g. I had <applet code="x" archive="a.jar b.jar, c.jar, d.jar"> and IE simply didn't load 'b.jar' so I got the usual 'class not found' exception. After signing every jar and putting every jar in every directory I finally noticed the commas between some of the jars.
    I can understand IE not helping me load an Applet since, from MS's point of view, that is evil Java code, but JDev must know the syntax of a HTML applet tag too so it could highlight the error for me.
    Alternatively does anyone know of a HTML checker plugin for JDEV?
    Regards,
    Simon.

    No comments?
    I've been looking around for a HTML syntax checker and there are plenty around - just google "html validation". None so far have picked up the missing comma in my busted applet tag. I guess with a missing comma it just looks like a file name with a space in it anyway.
    I still think JDeveloper could flag semantic errors like this at development time.
    Cheers,
    Simon.

  • HTML a tags in report

    Hi Guys,
    I have an updateable report in which the SQL calls a PLSQL function which adds HTML <a> tags to the returned value. This hyperlink is then used to call a seperate web page.
    Since our upgrade to v4, the report is acutually displaying the text of the link and not the HTML Link (shown below)
    'a href=http://lpar2.pln.cz.pan.eu:8030/pls/LMEL/xxmel_apex_eco_pkg.html_parents?P_ALT_ID=37900&p_curr_part=K1-F361ABGGG target=new>Multiple Parents</a'
    In v2, the 'Multiple Parents' would be displayed as a link and the 'a href=http://lpar2.pln.cz.pan.eu:8030/pls/LMEL/xxmel_apex_eco_pkg.html_parents?P_ALT_ID=37900&p_curr_part=K1-F361ABGGG target=new>' would be stripped out.
    Is there anything I need to change in v4 in order to get it displaying correctly.
    Thanks
    Chris

    Without seeing the code that generates the html, it's hard to tell. Is what you have posted above exactly as it is when you view the page source?
    If it is, you are missing the start of the opening a tag and the end of the closing a tag.
    the < and >For another, the attributes should be enclosed in double quotes. i.e.
    <a href="http://www.google.com">some link</a>Ta,
    Trent
    Edited by: trent on Dec 11, 2010 12:10 AM
    I would say the problem is this part of the href attribute:
    K1-F361ABGGG target=newthere is a space between K1-F361ABGGG and target, which is why it needs to be enclosed in double quotes.

  • How to add a value(text) from javascript to html:option tag .....

    How to populate the <html:option> tag dynamically
    I have a tree view, in tree view tag ( <layout:maeuItem> tag i have written "onclick " event )
    <layout:menuItem key="${agrovoc.AGURI}" link="#"
                                       onClick="return copyVal(this)">
    <script language="javascript" type="text/javascript">
                   function copyVal(obj){
                   str= obj.innerHTML; 
                   l = str.length-4;
                   xyz= str.substring(12,l);
                   document.getElementById('agrovoc').value =document.getElementById('agrovoc').value + xyz+'\n';
                   </script>Here "xyz" contains the Term ( the term clicked in the tree view) now i want add these terms ( clicked in tree view) into <html: option> tag.... how to do this.. plz give me some ideas
    <html:select  property="agrovocbuffer" size="10" >
                        <html:option value="" styleId="agrovoc1"></html:option>
                        </html:select>

    Hi,
    i have tried with this, it's works fine... but when i click on the next page ( i mean 2 or 3 page etc ) the content of <html:option> are erasing (deleting).. i wanted those terms wht i have selected in the 1st page to remain in <html:option> when i click on 2 nd page also...
    Tree view code
    <layout:menuItem key="${agrovoc.AGURI}" link="#"
                                       onClick=" copyVal(this)">JavaScript
    <script language="javascript" type="text/javascript">
                    var i=0;     
                    var myArray=new Array();
                   function copyVal(obj){
                        var flag=0;     
                   str= obj.innerHTML; 
                   l = str.length-4;
                   xyz= str.substring(12,l);
                   while (xyz != null) {
                   for( var l=0;l<myArray.length;l++){
                   if( myArray[l]==xyz){flag=1;alret("The Term is already selected.");}
                   if(flag!=1){
                   document.getElementById('agrovoc').options[i] =new Option(xyz,xyz);
                   myArray=xyz;
                   i++;
                   //alert(i);
                   xyz=null;
                   function del(){
                                  var oc=document.getElementById('agrovoc').options;
                                  //alert(oc.length);
                                  firstBox = document.getElementById('agrovoc');
                                  selectedOption = firstBox.options[firstBox.selectedIndex].value;
                                  selected = firstBox.options[firstBox.selectedIndex].index;
                                  //alert(selected);
                                  for( var l=0;l<myArray.length;l++){
                   if( myArray[l]==selectedOption){myArray[l]="";}
                                  firstBox.options[firstBox.selectedIndex] = null;
                                  var oc=document.getElementById('agrovoc').options;
                                  //alert(oc.length);
                                  for(var x=selected;x<oc.length;x++,selected++)
                                  document.getElementById('agrovoc').options[x] =new Option(firstBox.options[selected].value);
                                  i=oc.length;
                   </script>
    <html:select> code<div align="left" id="hopt">     
                   <td valign="top">
                   <logic:present name="hcount">
                        <html:select property="agrovocbuffer" size="15" styleId="agrovoc" multiple="true" style="width:200px;" >
                        <html:option value="" ></html:option>
                        </html:select><html:button property="button" onclick="del()"> DEL</html:button>
                   </logic:present>
                   </td>
                   </div>
    And all the above code is in <html:form> tag & i have written a custom pagination page
    Now i want  all terms which are in <html:option> remain  in options when i goto 2 nd page..
    how to do this? In the DOM inspector i'm getting the options, but when see the source HTML there are no <html:options>.. when click on the 2 page link the terms which are in <html:option> are not going to the "Action" class ..  :(
    how to do this .. any idea plz..?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Problem with html:select or html:options tags using struts,jsp and tomcat

    Hi
    I'm updating a Struts-Project to a new layout and therefore rework all jsp Sites.
    I'm also using a new Folder-Structure and update therefore my struts-config file.
    My Problem now is:
    Till now, we had a select-field with a code like this:
    < html:form action="/timetableAction" method="POST">
    < table width="53%" border="0">
    < tr>
    < td>< html:radio property="dauer" value="semester"
    /></ td>
    < html:select property="semester" size="1">
    < htmlptions name="semesterList" />
    </ html:select>
    </ html:form>
    The problem now is, that whenever I use any <html:xy> tag, the tomcat server I use can not show the page, he shows just the headers of the template, but not the
    content.-jsp-File where the form would be in. He stops right in the middle of the html page, when he notices the <html:xy> tags.
    And the funny thing is, that he has no problem to show a page when there is a <html:errors> within it? Why could this be? the struts-html.tld File is well included and teh Tomcat Server shows no exceptions.
    Waiting for you answers and thanks

    Thank you, I already got the answer in another forum

  • "Deleted items: Synchroniz​e deleted items between this mailbox and my device?" questions

    When I log into the BIS site for Sprint, it gives me the option at the bottom that says
    "Deleted items: Synchronize deleted items between this mailbox and my device." at the very bottom
    What does this really mean? I am confused because when you delete an email off the blackberry, it gives you 3 options, delete from "mailbox & handheld," "handheld," and "cancel".
    So, if I have the "Deleted items: Synchronize deleted items between this mailbox and my device." clicked...does that mean when I just choose delete from "handheld" only, it will STILL delete the email from my actual "mailbox" too?
    I don't want it to delete the email from my "mailbox" if I choose to delete from "handheld" only on my blackberry
    Does anyone know more about this?
    Thanks guys

    in my opinion :
    if you choose to delete on device only, it will never delete on your server.
    but best is you to try for one test message and you'll know for sure. And tell us.
    The search box on top-right of this page is your true friend, and the public Knowledge Base too:

  • How to compare result from sql query with data writen in html input tag?

    how to compare result
    from sql query with data
    writen in html input tag?
    I need to compare
    user and password in html form
    with all user and password in database
    how to do this?
    or put the resulr from sql query
    in array
    please help me?

    Hi dejani
    first get the user name and password enter by the user
    using
    String sUsername=request.getParameter("name of the textfield");
    String sPassword=request.getParameter("name of the textfield");
    after executeQuery() statement
    int exist=0;
    while(rs.next())
    String sUserId= rs.getString("username");
    String sPass_wd= rs.getString("password");
    if(sUserId.equals(sUsername) && sPass_wd.equals(sPassword))
    exist=1;
    if(exist==1)
    out.println("user exist");
    else
    out.println("not exist");

  • Insert an HTML Table tag as a value in a Tree Table

    Hi helper,
    Can I insert an HTML Table tag inside a TreeTable (Hierarchical data) using AdvancedDataGrid as a value?
    I need to create a Tree table in flex and I have beside normal int values some cells that need to show a certain images in an HTML Table I will create.
    Is it possible?
    Please advice
    Thanks
    Jo

    <div class=Section1><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>It depends on where you get the list of images<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>Alex Harui<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>Flex SDK Developer<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><a href="http://www.adobe.com/"><span style='color:blue'>Adobe<br />Systems Inc.</span></a><o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>Blog: <a href="http://blogs.adobe.com/aharui"><span<br />style='color:blue'>http://blogs.adobe.com/aharui</span></a><o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><br /><br /><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span<br />style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Yossi Bar<br />[mailto:[email protected]] <br><br /><b>Sent:</b> Monday, February 09, 2009 1:14 AM<br><br /><b>To:</b> [email protected]<br><br /><b>Subject:</b> Re: Insert an HTML Table tag as a value in a Tree Table<o:p></o:p></span></p><br /><br /></div><br /><br /><p class=MsoNormal><o:p> </o:p></p><br /><br /><p class=MsoNormal style='margin-bottom:12.0pt'>A new message was posted by<br />Yossi Bar in <br><br /><br><br /><b>Developers</b> --<br><br />  Insert an HTML Table tag as a value in a Tree Table<br><br /><br><br />Thanks Alex, <br><br />What is the way to implement HorizontalLIst of images for<br />AdvancedDataGridColumn? <br><br /><br><br />In the code here I create a tree table and in Actual column I show an image: <br><br /><br><br />&lt;mx:AdvancedDataGrid width=&quot;100%&quot; height=&quot;100%&quot;<br />folderClosedIcon=&quot;{null}&quot; folderOpenIcon=&quot;{null}&quot;<br />defaultLeafIcon=&quot;{null}&quot;&gt; <br><br /><br><br />&lt;mx:dataProvider&gt; <br><br />            &lt;mx:HierarchicalData<br />source=&quot;{dpHierarchy}&quot;/&gt; <br><br />        &lt;/mx:dataProvider&gt; <br><br />        &lt;mx:groupedColumns&gt; <br><br />         &lt;mx:AdvancedDataGridColumn<br />headerText=&quot;&quot; width=&quot;50&quot;/&gt; <br><br />            &lt;mx:AdvancedDataGridColumn<br />dataField=&quot;Region&quot; backgroundColor=&quot;haloSilver&quot;<br />headerText=&quot;Region title&quot;<br />headerRenderer=&quot;mx.controls.Label&quot;/&gt; <br><br />            &lt;mx:AdvancedDataGridColumnGroup<br />headerText=&quot;Group Header&quot;<br />headerRenderer=&quot;mx.controls.Label&quot;&gt; <br><br />&lt;mx:AdvancedDataGridColumn dataField=&quot;Territory_Rep&quot;<br />headerText=&quot;Territory Rep&quot;<br />headerRenderer=&quot;mx.controls.Label&quot;/&gt; <br><br />&lt;mx:AdvancedDataGridColumn dataField=&quot;Actual&quot;<br />headerText=&quot;Actual title&quot;<br />headerRenderer=&quot;mx.controls.Label&quot;&gt; <br><br />&lt;mx:itemRenderer&gt; <br><br />&lt;mx:Component&gt; <br><br />&lt;mx:VBox horizontalAlign=&quot;center&quot;&gt; <br><br />&lt;mx:Image width=&quot;50&quot; source=&quot;{data.Actual}&quot;/&gt; <br><br />&lt;/mx:VBox&gt; <br><br />&lt;/mx:Component&gt; <br><br />&lt;/mx:itemRenderer&gt; <br><br />&lt;/mx:AdvancedDataGridColumn&gt; <br><br /><br><br />&lt;mx:AdvancedDataGridColumn dataField=&quot;Estimate&quot;<br />headerText=&quot;Estimate title&quot; headerRenderer=&quot;mx.controls.Label&quot;/&gt;<br /><br><br />            &lt;/mx:AdvancedDataGridColumnGroup&gt;<br /><br><br />        &lt;/mx:groupedColumns&gt; <br><br />    &lt;/mx:AdvancedDataGrid&gt; <br><br /><br><br />Please advise, <br><br /><br><br />Thanks <br><br /><br><br />Jo <o:p></o:p></p><br /><br /><div class=MsoNormal><br /><br /><hr size=2 width=200 style='width:150.0pt' align=left><br /><br /></div><br /><br /><p class=MsoNormal style='margin-bottom:12.0pt'>View/reply at <a<br />href="http://www.adobeforums.com/webx?13@@.59b7d1ae/2">Insert an HTML Table tag<br />as a value in a Tree Table</a><br><br />Replies by email are OK.<br><br />Use the <a<br />href="http://www.adobeforums.com/webx?280@@.59b7d1ae!folder=.3c060fa3">unsubscribe</a>< br />form to cancel your email subscription.<o:p></o:p></p><br /><br /></div>

  • How do I delete a character tag so it does not continue to show up in my designer.

    Hello.
    I have deleted a character tag from the catalog but it keeps showing up in the designer and stays associated with any new paragraph tag I try to create. How can I set the character designer to blank?
    Thanks

    >System Preferences>Mission Control>Show Desktop...should be F11:
    If not, change it.

  • Error message when trying to delete a conditional tag.

    When attempting to delete a conditional tag, the following error occurred and then the program closed down:
    0x00ca1940/ 0x00000000
    Anyone come across this error. In addition, I have had similar errors occurred when resizing graphic frames. Once the error occurs, the program shuts down.

    Paul,
    It might help if you let us know which version and build of FM that
    this happened in.
    Was the tag still in use throughout the document when you tried to
    delete the condition? Did you get any prompts about deleting the
    condition?

  • How do I create (or delete) a new tag for a website, so that its tag appears (or does not appear) every time I restart Firefox?

    How do I create (or delete) a new tag for a website, so that its tag appears (or does not appear) every time I restart Firefox?

    See this - https://support.mozilla.org/en-US/kb/How%20to%20set%20the%20home%20page

  • Use of titleKey attribute in html:select tag

    Hi,
    There is one "titleKey" attribute to create mouse over pop-up texts taking key values from property files in case of i18n. It works for every struts specific tag like <html:text titleKey="help.rmc.name"/> or <html:checkbox titleKey="help.rmc.name"/> except for <html:select> tag which is used for creating combo box or list box. But this tag contains the titleKey attribute.
    Please give me some suggestions how to implement this mouse over pop-up texts in case of <html:select> tag

    Hi,
    There is one "titleKey" attribute to create mouse over pop-up texts taking key values from property files in case of i18n. It works for every struts specific tag like <html:text titleKey="help.rmc.name"/> or <html:checkbox titleKey="help.rmc.name"/> except for <html:select> tag which is used for creating combo box or list box. But this tag contains the titleKey attribute.
    Please give me some suggestions how to implement this mouse over pop-up texts in case of <html:select> tag

  • How to specify HTML meta tags?

    I'm trying to get a portal to always have the following an HTML meta tag in the head of the generated HTML:
    <meta name="ROBOTS" content="NOFOLLOW" />
    I haven't seen any documentation about doing this in particular, but looking at some of the XML schema (*.xsd) files in various weblogic-specific jars, it seems like maybe the following would work in the <netuix:head> tag of the .portal configuration file for the portal:
    <netuix:head>
    <netuix:meta name="ROBOTS" content="NOFOLLOW" />
    </netuix:head>
    However, this does not seem to work.
    Also, I've checked the skin.properties file to see if there are any comments about how to specify meta tags, but there aren't any.

    Turns out there are a number of ways to do this. A BEA consultant recommended modifying the "head.jsp" for the portal's skin.
    Alternatively, it dawned on me that all I had to do was put the meta tags in a jsp and use that jsp in the head area of the .portal file. For example:
    <netuix:head>
    <netuix:jspContent contentUri="/resources/jsp/customHead.jsp"/>
    </netuix:head>

Maybe you are looking for

  • Field in DSO 0BBP_QUO from Datasource 0BBP_TD_QUOT_1

    Hi,    Please let me know if someone has any idea about transformation that needs to be done to get value for field 0SR_NOREJCT(Number of Rejections) from the various fields of datasource 0BBP_TD_QUOT_1 (bids) or any other datasources which may get t

  • File name and Date Display as an obj not the data

    All,      The issue that I am having is that when I view a Visio file hosted on SharePoint. The file was created in Visio 2007 and when it is opened by Visio 2007 and Visio Viewer in SharePoint. The file name field object and date modified object sho

  • Adobe Bridge/Camera RAW Question

    Hello. Can anyone tell me what the little gray circle icon with the two arrows in it is? This icon appears on RAW image thumbnails after opening a RAW file in Camera RAW via Adobe Bridge. When you mouseover it says nothing, when you click on it it do

  • Query to be saved in Application Server

    Hi Gurus , We are on BI 7.0  SP 10 , We have a requirement, to send a Query Report to an Application Server . Is it Possible ??? If yes how ? Appreciate if you can give in detail how we can implement this in BI 7.0 . Waiting for a quick Reply . Thank

  • Account determination for COGS account by customer

    Dear gurus I'd like to get advice about account determination for COGS account. I have requirement to determine COGS account based on "Customer". If the customer is outside the group, we want to charge to "Sales: Third-party" and "COGS: Third-party"