Regex for HTML tags

I would like to modify (enclose) the inner text of a td tag, such that:
<td align="center">abc123</td> to become <td align="center">="abc123"</td>
htmltext = htmtext.replaceAll("(<td\\b[^>]*>)(.*?)(</td>)", "$1=\"$2\"$3");That works, but I want to try the lookaround technique, as follows:
htmltext = htmtext.replaceAll("(?=<td\\b[^>]*>)(.*?)(?<=</td>)", "=\"$1\"");but it yields ="<td align="center">abc123</td>"
What would be the correct regex? Thanks.

nguyenq87 wrote:
Would you care to explain why the reluctant quantifier ? is omitted from (.*)?Note that "(.*?)" and "(.*)?" are tow different things! The first is a reluctant DOT-STAR. The latter means: "optionally match zero or more characters".
nguyenq87 wrote:
I thought without it, it would consume the closing tag also.It does, but then back tracks in favour of a match. It's safer to make the DOT-STAR reluctant instead of greedy. The greedy variant will match:
"<td>foo</td> bbb <td>bar</td>" from a string like:
"aaa <td>foo</td> bbb <td>bar</td> ccc" I assume you know it's rather tricky to parse HTML using regex... Just to name two issues: what about commented HTML? And what about td's that span more than one line?

Similar Messages

  • [svn:fx-trunk] 5289: Fix for - HTML tags in span tags in ASdoc comments not being parsed correctly.

    Revision: 5289
    Author: [email protected]
    Date: 2009-03-12 21:09:58 -0700 (Thu, 12 Mar 2009)
    Log Message:
    Fix for - HTML tags in
    tags in ASdoc comments not being parsed correctly.
    QE Notes: Some baseline will require update.
    Doc Notes: None.
    Bugs: SDK-19815
    tests: checkintests, asdoc
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-19815
    Modified Paths:
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/AsDocUtil.java

    Resize/re-scale & optimize all images for the web in your graphics editor before you insert them into your web pages.  Saves bandwidth and reduces page load.
    Cycle2 is a responsive slideshow.  If you want all images to remain 400px and not responsive to layout,  you'll need to modify the CSS code a little.
    Details on using Previous & Next links are in the documentation.
    http://jquery.malsup.com/cycle2/demo/prevnext.php
    Nancy O.

  • Java wrapper for html tags

    Hi,
    I need one java wrapper class for html tags. If anyone is having such pls reply.
    Thanks in advance
    Sisir

    Like java.lang.String?
    You use it like this
    String textTag = "text";
    If that isn't what you had in mind then you might want to provide a bit more detail as to what you think it should do.

  • Struts 2 validation for HTML tags

    Hi,
    I am doing Struts2 validation with validation.xml for HTML tags. Here i am doing a binding between a form (bean) and the respective field in JSP and validation.xml. The validation error messages are populated without any problem but the value entered in the respective text field for HTML tags is not persisted. This problem does not occur if you use Struts 2 tags in JSP. Here is a snippet of what i am doing:-
    JSP:-
    <input:text name="accountForm.firstName" size="12" maxlength="20" />
    Action:-
    class AccountAction {
    private AccountForm accountForm;
    public void setAccountForm (AccountForm accountForm) {
    this. accountForm = accountForm;
    public String insertAccount () throws ApplicationException {
    // To get the account details from the JSP
    String first Name = accountForm.getFirstName ();
    action-validation.xml:-
    <validators>
    <field name="accountBean.firstName">
    <field-validator type="requiredstring">
    <param name="trim">true</param>
    <message> First Name is required.</message>
    </field-validator>
    </field>
    <validators>
    Whether it is possible to persist the value with HTML tags with Struts 2 validation? or i need to go with Struts 2 tags in JSP. Please shed some light in to it.
    Thanks,
    JavaCrazyLover

    FYI
    I am using spring framework with struts2 UI
    ..pls
    do the needful..
    Thanks in advance
    -Satish

  • Replace function for HTML tags

    Hie Guys,
    I would like to get rid of the HTML tags from a column/object in my report using the "Replace" function. Basically, I want to replace whatever the content is between "<" & ">" i.e. the opening and closing tags. I know I can use the "Pos" function to identify the position of "<" & ">", but I am not sure exactly how to achieve this in Webi. FYI -  "Read content as HTML" & "Read content as Hyperlink" did not resolve the issue. Can anyone please help? Thanks.

    Hi Jeewan,
    It will be very tedious to do this at Webi level.
    I have tried below example. It might help you to work around your issue; however, not completely:
    1. Created an Excel and inserted single value in first column as:
    <html><b>this is yuvraj</b></html>
    2. Used it as source and created a Webi report in Rich client.
    3. Applied SubStr recursively using Pos function and created below variables:
    test : =Substr([column_1]; Pos([column_1];">")+1;Length([column_1]))
    test1: =Substr([test]; Pos([test];">")+1;Length([test]))
    test2 : =Substr([test1]; 0;Pos([test1];"<")-1)
    The output has been attached.

  • Setting style for html tags in flex

    I need to add display:inline style property to <p>tag in flex CSS. Is there anyway to do like the below in flex
    p{ display:inline}
    Thanks in advance.

    Hi rizmysl,
    You cannot directly set the backgroundColor to a Label control however you can do it by getting a reference to the underlying TextField control inside the Label, for that you need to write some actionscript.
    Check out the below code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()">
         <mx:Style>
              .texfield{ width:300; height:30; background-color:red; fontWeight:bold;}
         </mx:Style>
         <mx:Script>
          <![CDATA[
           import mx.core.IUITextField;
           private function init():void
            //Getting reference to the underlying TextFiled control inside Label
            var tf:IUITextField = (myTextField.mx_internal::getTextField());
            tf.background = true;
            tf.backgroundColor = 0XFF0000;
            tf.width = 300;
            tf.height = 30;
          ]]>
         </mx:Script>
         <mx:Label x="25" y="113" text="My Sample Text Goes Here ...."  styleName="texfield" id="myTextField" />
    </mx:Application>
    Thanks,
    Bhasker Chari    

  • Regex for html

    hi!
    I have this code:
    Pattern pattern = Pattern.compile("<div class=\"center_side\">(.*)</div><!-- end center_side -->");//("<div class=\"center_side\">(.*)</div><!-- end center_side -->");//(@"<div class=""center_side""[^>]*>(.*)</div>\s*<!-- end center_side ->",
                Matcher matcher = pattern.matcher(fisier);
                boolean found = false;
                while (matcher.find()) {
                    System.out.println("I found the text "+matcher.group()+ "starting at " +
                       "index "+matcher.start()+ " and ending at index "+ matcher.end()+".%n");
                    found = true;
                if(!found){
                    System.out.println("No match found.%n");
                }it checks if a pattern like:
    <div class="center_side"> bla bla </div><!-- end center_side -->
    exists in the fiser string variable. the problem is it never works. what heva i done worng? is the regular expression good? the same expression works under c#, so i don not think that this is the problem. pls help!

    (.*?) doesn't work eighter. it prints "no match found".
    the file i wanna check is: (i want the text in red)
    <noscript><div style='display:inline'><img src='http://ad2.ip.ro/please/showit/472/11/1/11/?typkodu=img&keywords=' width='160' height='600' style='border-width:0' alt='' /></div></noscript>
    </div>
    </div>
    </div>
    </div>
    <!-- right~ -->
    {color:#ff0000}<div class="center_side">
    <div class="center">
    <div class="rezultate">
    <h3>Arhiva pentru data 02.04.2008</h3>{color}
    {color:#ff0000}
    <span class="num_result">1 - 20 din <strong>175 rezultate</strong> </span>{color}
    {color:#ff0000} <div class="result_item">
    1.<a class="result_title" href="{color}[{color:#ff0000}http://www.hotnews.ro/stiri-international-2717494-ayman-zawahri-numarul-2-qaeda-vom-ataca-evreii-israel-afara-lui.htm%22%3E%3Cstrong%3EAyman{color}|http://www.hotnews.ro/stiri-international-2717494-ayman-zawahri-numarul-2-qaeda-vom-ataca-evreii-israel-afara-lui.htm%22%3E%3Cstrong%3EAyman]{color:#ff0000} al-Zawahri, numarul 2 in Al Qaeda: Vom ataca evreii in Israel si in afara lui</strong></a>
    <span class="stire">Ayman al-Zawahri, numarul 2 in Al Qaeda, a declarat in cadrul unei sesiuni de raspunsuri pe internet ca organizatia sa va ataca evreii in Israel si in afara lui. al-Zawahri a deschis unul dintre site-urile afiliate Al Qaeda pentru intrebari din partea presei, termenul-limita pentru trimiterea acestora fiind 16 ianuarie.</span>
    <div class="actualitate_footer align_text">
    <span>Miercuri, 2 aprilie 2008, 23:53
    &icirc;n <a href="{color}[{color:#ff0000}http://www.hotnews.ro/international{color}|http://www.hotnews.ro/international]{color:#ff0000}"
    title="Actualitate | International">Actualitate | International</a>
    </span>
    </div>
    </div>
    <div class="result_item">
    2.<a class="result_title" href="{color}[{color:#ff0000}http://sport.hotnews.ro/stiri-fotbal-2717486-arsenal-liverpool-1-1-remiza-titanilor-video.htm%22%3E%3Cstrong%3EArsenal{color}|http://sport.hotnews.ro/stiri-fotbal-2717486-arsenal-liverpool-1-1-remiza-titanilor-video.htm%22%3E%3Cstrong%3EArsenal]{color:#ff0000} - Liverpool 1-1/ Remiza titanilor (VIDEO)</strong></a>
    <span class="stire">Duelul britanic al sferturilor s-a incheiat la egalitate in prima mansa: Arsenal a deschis scorul prin Adebayor (23), insa Liverpool a egalat imediat prin Kuyt (26). In a doua repriza, arbitrul a refuzat un penalty lui Arsenal (interventie neregulamentara a lui Kuyt asupra lui Hleb). Spre final, atacantul londonezilor Bendtner a impiedicat o minge a coechipierilor sa intre in plasa, oprind-o pe linia portii. Fara sa vrea, fireste. </span>
    <div class="actualitate_footer align_text">
    <span>Miercuri, 2 aprilie 2008, 23:53
    &icirc;n <a href="{color[{color:#ff0000http://sport.hotnews.ro/fotbal{color}|http://sport.hotnews.ro/fotbal]{color:#ff0000}"
    title="Sport | Fotbal">Sport | Fotbal</a>
    </span>
    </div>
    </div>
    <div class="result_item">
    3.<a class="result_title" href="{color}[{color:#ff0000}http://www.hotnews.ro/stiri-ultima_ora-2717429-liga-campionilor-fenerbahce-chelsea-2-1.htm%22%3E%3Cstrong%3ELiga{color}|http://www.hotnews.ro/stiri-ultima_ora-2717429-liga-campionilor-fenerbahce-chelsea-2-1.htm%22%3E%3Cstrong%3ELiga]{color:#ff0000} Campionilor: Fenerbahce - Chelsea 2-1</strong>
    <span class="stire">Echipa turca Fenerbahce a furnizat surpriza sferturilor de finala, castigind cu 2-1 mansa-tur disputata contra lui Chelsea Londra. </span>
    <div class="actualitate_footer align_text">
    <span>Miercuri, 2 aprilie 2008, 23:38
    &icirc;n <a href="{color[{color:#ff0000http://www.hotnews.ro/ultima_ora{color}|http://www.hotnews.ro/ultima_ora]{color:#ff0000}"
    title="Ultima ora">Ultima ora</a>
    </span>
    </div>
    </div>
    <div class="result_item">
    4.<a class="result_title" href="{color}[{color:#ff0000}http://www.hotnews.ro/stiri-esential-2717364-update-purtatorul-cuvant-nato-nu-astept-ucraina-georgia-primeasca-map-albania-croatia-unanimitate-macedonia-probleme-din-cauza-numelui.htm%22%3E%3Cstrong%3EUPDATE{color}|http://www.hotnews.ro/stiri-esential-2717364-update-purtatorul-cuvant-nato-nu-astept-ucraina-georgia-primeasca-map-albania-croatia-unanimitate-macedonia-probleme-din-cauza-numelui.htm%22%3E%3Cstrong%3EUPDATE]{color:#ff0000}: Purtatorul de cuvant al NATO: Nu ma astept ca Ucraina si Georgia sa primeasca MAP; Albania si Croatia au unanimitate, Macedonia - probleme din cauza numelui</strong>
    <span class="stire">Purtatorul de cuvant al NATO, James Appathurai, a declarat miercuri
    noapte ca nu se asteapta
    ca Ucraina si Georgia sa primeasca joi Membership Action Plan (MAP). Appathurai a mai declarat ca in cadrul NATO exista un consens privind adresarea invitatiei de aderare pentru Albania si Croatia. In ceea ce priveste Macedonia, aceasta nu beneficiaza de o sustinere unanima din cauza divergentelor cu Grecia pe tema numelui.</span>
    <div class="actualitate_footer align_text">
    <span>Miercuri, 2 aprilie 2008, 23:36
    &icirc;n <a href="{color[{color:#ff0000http://www.hotnews.ro/esential{color}|http://www.hotnews.ro/esential]{color:#ff0000}"
    title="Actualitate | Esential">Actualitate | Esential</a>
    </span>
    </div>
    </div>
    <div class="result_item">
    5.<a class="result_title" href="{color}[{color:#ff0000}http://www.hotnews.ro/stiri-ultima_ora-2717361-liga-campionilor-arsenal-liverpool-1-1.htm%22%3E%3Cstrong%3ELiga{color}|http://www.hotnews.ro/stiri-ultima_ora-2717361-liga-campionilor-arsenal-liverpool-1-1.htm%22%3E%3Cstrong%3ELiga]{color:#ff0000} Campionilor: Arsenal - Liverpool 1-1</strong>
    <span class="stire">Mansa-tur a duelului britanic din sferturile Champions League s-a incheiat la egalitate: Arsenal - Liverpool 1-1.</span>
    <div class="actualitate_footer align_text">
    <span>Miercuri, 2 aprilie 2008, 23:34
    &icirc;n <a href="{color[{color:#ff0000http://www.hotnews.ro/ultima_ora{color}|http://www.hotnews.ro/ultima_ora]{color:#ff0000}"
    title="Ultima ora">Ultima ora</a>
    </span>
    </div>
    </div>
    <div class="result_item">
    6.<a class="result_title" href="{color}[{color:#ff0000}http://revistapresei.hotnews.ro/stiri-radio_tv-2717210-emil-hurezeanu-romania-bulgaria-nu-fost-niciodata-verigi-strategice-pentru-rusia.htm%22%3E%3Cstrong%3EEmil{color}|http://revistapresei.hotnews.ro/stiri-radio_tv-2717210-emil-hurezeanu-romania-bulgaria-nu-fost-niciodata-verigi-strategice-pentru-rusia.htm%22%3E%3Cstrong%3EEmil]{color:#ff0000} Hurezeanu: Romania si Bulgaria nu au fost niciodata verigi strategice pentru Rusia</strong>
    <span class="stire">Nicioadata Romania si Bulgaria nu au fost verigi strategice pentru Rusia, ca dovada sovieticii au parasit Romania ca adoua tara ocupata din rasarit, a declarat Emil Hurezeanu in cadrul emisiunii The Money Show (The Money Chanel). Hurezeanu spune ca pe romani nu-i va costa in plus suplimentarea trupelor romanesti in Afganistan deoarece avem deja acolo un contingent de rezerva ce se afla la dispozitia Secretarului General al NATO.</span>
    <div class="actualitate_footer align_text">
    <span>Miercuri, 2 aprilie 2008, 23:20
    &icirc;n <a href="{color[{color:#ff0000http://revistapresei.hotnews.ro/radio_tv{color}|http://revistapresei.hotnews.ro/radio_tv]{color:#ff0000}"
    title="Revista Presei | Radio TV">Revista Presei | Radio TV</a>
    </span>
    </div>
    </div>
    <div class="result_item">
    7.<a class="result_title" href="{color}[{color:#ff0000}http://www.hotnews.ro/stiri-opinii-2717177-summitul-nato-este-deja-spectacolul-unui-singur-vladimir-putin.htm%22%3E%3Cstrong%3ESummitul{color}|http://www.hotnews.ro/stiri-opinii-2717177-summitul-nato-este-deja-spectacolul-unui-singur-vladimir-putin.htm%22%3E%3Cstrong%3ESummitul]{color:#ff0000} NATO este deja spectacolul unui singur om: Vladimir Putin</strong>
    <span class="stire">Vladimir Putin n-a venit inca la Bucuresti, dar pare sa fi "furat" intreg spectacolul, vorba americanilor, cei care au anticipat aceasta situatie paradoxala inca de acum cateva luni. Bush, Basescu, Scheffer, analisti de politica externa, toti s-au raportat la presedintele rus si/sau i-au transmis mesaje in prima zi oficiala a evenimentului de la Bucuresti. Iar in saloanele unde au loc reuniunile oficiale, prezenta virtuala a lui Putin e aproape palpabila.</span>
    <div class="actualitate_footer align_text">
    <span>Miercuri, 2 aprilie 2008, 23:04
    &icirc;n <a href="{color[{color:#ff0000http://www.hotnews.ro/opinii{color}|http://www.hotnews.ro/opinii]{color:#ff0000}"
    title="Actualitate | Opinii">Actualitate | Opinii</a>
    </span>
    </div>
    </div>
    <div class="result_item">
    8.<a class="result_title" href="{color}[{color:#ff0000}http://sport.hotnews.ro/stiri-fotbal-2717034-comisia-apel-grabit-judecarea-memoriului-introdus-rapid.htm%22%3E%3Cstrong%3EComisia{color}|http://sport.hotnews.ro/stiri-fotbal-2717034-comisia-apel-grabit-judecarea-memoriului-introdus-rapid.htm%22%3E%3Cstrong%3EComisia]{color:#ff0000} de Apel a grabit judecarea memoriului introdus de Rapid</strong>
    <span class="stire">Joi, 3 aprilie, ora 14,00, comisia de apel a Federatiei romane de fotbal a convocat oficialii clubului Rapid pentru a judeca memoriul introdus impotriva deciziei de a pierde la masa verde derby-ul cu Steaua. </span>
    <div class="actualitate_footer align_text">
    <span>Miercuri, 2 aprilie 2008, 22:03
    &icirc;n <a href="{color[{color:#ff0000http://sport.hotnews.ro/fotbal{color}|http://sport.hotnews.ro/fotbal]{color:#ff0000}"
    title="Sport | Fotbal">Sport | Fotbal</a>
    </span>
    </div>
    </div>
    <div class="result_item">
    9.<a class="result_title" href="{color}[{color:#ff0000}http://www.hotnews.ro/stiri-ultima_ora-2716610-canal-lansat-nato.htm%22%3E%3Cstrong%3ECanal{color}|http://www.hotnews.ro/stiri-ultima_ora-2716610-canal-lansat-nato.htm%22%3E%3Cstrong%3ECanal]{color:#ff0000} TV lansat de NATO</strong>
    <span class="stire">Secretarul general al NATO, Jaap de Hoop Scheffer, impreuna cu
    premierul danez, Anders Fogh Rasmussen, au lansat un canal de
    televiziune pe Internet care va transmite pe toata perioada summitului.</span>
    <div class="actualitate_footer align_text">
    <span>Miercuri, 2 aprilie 2008, 21:37
    &icirc;n <a href="{color[{color:#ff0000http://www.hotnews.ro/ultima_ora{color}|http://www.hotnews.ro/ultima_ora]{color:#ff0000}"
    title="Ultima ora">Ultima ora</a>
    </span>
    </div>
    </div>
    <div class="result_item">
    10.<a class="result_title" href="{color}[{color:#ff0000}http://www.hotnews.ro/stiri-international-2716487-rusia-elaborat-plan-actiuni-cazul-care-ucraina-primeste-invitatia-adera-nato.htm%22%3E%3Cstrong%3ERusia{color}|http://www.hotnews.ro/stiri-international-2716487-rusia-elaborat-plan-actiuni-cazul-care-ucraina-primeste-invitatia-adera-nato.htm%22%3E%3Cstrong%3ERusia]{color:#ff0000} a elaborat un plan de actiuni in cazul in care Ucraina primeste invitatia de a adera la NATO</strong>
    <span class="stire">Un inalt diplomat rus a declarat ca Moscova a elaborat planuri in cazul
    in care Georgia si Ucraina vor primi invitatia sa adere la Planul de
    actiuni al NATO (MAP), dar a refuzat sa dezvaluie continutul acestor
    planuri, scrie agentia Utro.</span>
    <div class="actualitate_footer align_text">
    <span>Miercuri, 2 aprilie 2008, 20:44
    &icirc;n <a href="{color[{color:#ff0000http://www.hotnews.ro/international{color}|http://www.hotnews.ro/international]{color:#ff0000}"
    title="Actualitate | International">Actualitate | International</a>
    </span>
    </div>
    </div>
    <div class="result_item">
    11.<a class="result_title" href="{color}[{color:#ff0000}http://www.hotnews.ro/stiri-international-2716469-bush-intalni-soci-medvedev.htm%22%3E%3Cstrong%3EBush{color}|http://www.hotnews.ro/stiri-international-2716469-bush-intalni-soci-medvedev.htm%22%3E%3Cstrong%3EBush]{color:#ff0000} se va intalni la Soci cu Medvedev</strong>
    <span class="stire">Presedintele SUA, George Bush, care va sosi la Soci pentru intalnirea
    cu din 6 aprilie cu seful statului rus, Vladimir Putin, se va intalni,
    de asemenea, cu presedintele ales al Rusiei, Dmitri Medvedev, a anuntat
    consilierul presidential al Rusiei, Serghei Prihodko, citat de Gazeta.ru.</span>
    <div class="actualitate_footer align_text">
    <span>Miercuri, 2 aprilie 2008, 20:42
    &icirc;n <a href="{color[{color:#ff0000http://www.hotnews.ro/international{color}|http://www.hotnews.ro/international]{color:#ff0000}"
    title="Actualitate | International">Actualitate | International</a>
    </span>
    </div>
    </div>
    <div class="result_item">
    12.<a class="result_title" href="{color}[{color:#ff0000}http://www.hotnews.ro/stiri-ultima_ora-2716466-arad-circulatie-rutiera-blocata-sens-dn7.htm%22%3E%3Cstrong%3EArad{color}|http://www.hotnews.ro/stiri-ultima_ora-2716466-arad-circulatie-rutiera-blocata-sens-dn7.htm%22%3E%3Cstrong%3EArad]{color:#ff0000}: Circulatie rutiera blocata pe un sens pe DN7</strong>
    <span class="stire">Circulatia rutiera este blocata pe un sens la aceasta ora pe DN7, in
    zona localitatii aradene Lipova, din cauza unui accident de circulatie.</span>
    <div class="actualitate_footer align_text">
    <span>Miercuri, 2 aprilie 2008, 20:41
    &icirc;n <a href="{color[{color:#ff0000http://www.hotnews.ro/ultima_ora{color}|http://www.hotnews.ro/ultima_ora]{color:#ff0000}"
    title="Ultima ora">Ultima ora</a>
    </span>
    </div>
    </div>
    <div class="result_item">
    13.<a class="result_title" href="{color}[{color:#ff0000}http://english.hotnews.ro/stiri-business-2716416-usa-federal-reserve-president-ben-bernake-admit-the-peril-economic-recession.htm%22%3E%3Cstrong%3EUSA{color}|http://english.hotnews.ro/stiri-business-2716416-usa-federal-reserve-president-ben-bernake-admit-the-peril-economic-recession.htm%22%3E%3Cstrong%3EUSA]{color:#ff0000}: Federal Reserve President Ben Bernake to admit the peril of an economic recession</strong>
    <span class="stire">President of the American Central Bank (FED) Ben Bernanke admitted on Wednesday that the US economy might enter into recession in the first half of the year, admitting that the situation got worse in the last couple of months.</span>
    <div class="actualitate_footer align_text">
    <span>Miercuri, 2 aprilie 2008, 20:31
    &icirc;n <a href="{color[{color:#ff0000http://english.hotnews.ro/business{color}|http://english.hotnews.ro/business]{color:#ff0000}"
    title="English | Business">English | Business</a>
    </span>
    </div>
    </div>
    <div class="result_item">
    14.<a class="result_title" href="{color}[{color:#ff0000}http://www.hotnews.ro/stiri-ultima_ora-2716310-opt-delegatii-oficiale-sunt-cazate-hotel-hilton.htm%22%3E%3Cstrong%3EOpt{color}|http://www.hotnews.ro/stiri-ultima_ora-2716310-opt-delegatii-oficiale-sunt-cazate-hotel-hilton.htm%22%3E%3Cstrong%3EOpt]{color:#ff0000} delegatii oficiale sunt cazate la Hotel Hilton</strong>
    <span class="stire">Delegatiile Germaniei, Georgiei, Poloniei, Canadei, Olandei, Estoniei,
    Lituaniei si Azerbaidjanului sunt gazduite la Hotel Hilton, pe durata
    summitului NATO.</span>
    <div class="actualitate_footer align_text">
    <span>Miercuri, 2 aprilie 2008, 20:06
    &icirc;n <a href="{color[{color:#ff0000http://www.hotnews.ro/ultima_ora{color}|http://www.hotnews.ro/ultima_ora]{color:#ff0000}"
    title="Ultima ora">Ultima ora</a>
    </span>
    </div>
    </div>
    <div class="result_item">
    15.<a class="result_title" href="{color}[{color:#ff0000}http://economie.hotnews.ro/stiri-finante_banci-2716226-sua-ben-bernanke-seful-fed-admite-premiera-pericolul-recesiunii-economice.htm%22%3E%3Cstrong%3ESUA{color}|http://economie.hotnews.ro/stiri-finante_banci-2716226-sua-ben-bernanke-seful-fed-admite-premiera-pericolul-recesiunii-economice.htm%22%3E%3Cstrong%3ESUA]{color:#ff0000}: Ben Bernanke, seful FED, admite in premiera pericolul recesiunii economice</strong>
    <span class="stire">Ben Bernanke, presedintele Bancii Centrale Americane - Federal Reserve,
    a admis miercuri, in premiera, ca economia SUA ar putea intra in
    recesiune in prima jumatate a anului, admitand inrautatirea situatiei
    din ultimele doua luni. Bursa din New York a reactionat insa mai putin
    dur decat s-au asteptat analistii pietelor financiare, socul
    declaratiilor lui Bernanke fiind atenuat, cel putin la deschiderea
    sedintei, de un raport care arata ca numarul locurilor de munca in
    sectorul privat a crescut in martie cu 8.000.</span>
    <div class="actualitate_footer align_text">
    <span>Miercuri, 2 aprilie 2008, 19:51
    &icirc;n <a href="{color[{color:#ff0000http://economie.hotnews.ro/finante_banci{color}|http://economie.hotnews.ro/finante_banci]{color:#ff0000}"
    title="Economie | Finante & Banci">Economie | Finante & Banci</a>
    </span>
    </div>
    </div>
    <div class="result_item">
    16.<a class="result_title" href="{color}[{color:#ff0000}http://life.hotnews.ro/stiri-horoscop-2716055-horoscopul-pentru-joi-3-aprilie.htm%22%3E%3Cstrong%3EHoroscopul{color}|http://life.hotnews.ro/stiri-horoscop-2716055-horoscopul-pentru-joi-3-aprilie.htm%22%3E%3Cstrong%3EHoroscopul]{color:#ff0000} pentru joi, 3 aprilie</strong>
    <span class="stire">BERBECSefii ori partenerii va cam ocolesc si comportamentul lor nu va convine deloc, deoarece presupune schimbari pentru care nu vi se cere parerea. Visati la o marire de "salariu", cu toate ca nu este posibil.Sanatate &ndash; ?Bani &ndash;??Dragoste &ndash;???</span>
    <div class="actualitate_footer align_text">
    <span>Miercuri, 2 aprilie 2008, 19:12
    &icirc;n <a href="{color[{color:#ff0000http://life.hotnews.ro/horoscop{color}|http://life.hotnews.ro/horoscop]{color:#ff0000}"
    title="Life | Horoscop">Life | Horoscop</a>
    </span>
    </div>
    </div>
    <div class="result_item">
    17.<a class="result_title" href="{color}[{color:#ff0000}http://www.hotnews.ro/stiri-ultima_ora-2716049-urmatorul-atentat-din-sua-putea-comis-teroristi-blonzi-ochi-albastri.htm%22%3E%3Cstrong%3EUrmatorul{color}|http://www.hotnews.ro/stiri-ultima_ora-2716049-urmatorul-atentat-din-sua-putea-comis-teroristi-blonzi-ochi-albastri.htm%22%3E%3Cstrong%3EUrmatorul]{color:#ff0000} atentat din SUA ar putea fi comis de teroristi blonzi cu ochi
    albastri</strong>
    <span class="stire">Urmatorul atentat din Statele Unite ar putea fi comis de teroristi
    blonzi cu ochi albastri, antrenati in tabere din zona dintre Pakistan
    si Afganistan, comenteaza Reuters.</span>
    <div class="actualitate_footer align_text">
    <span>Miercuri, 2 aprilie 2008, 19:10
    &icirc;n <a href="{color[{color:#ff0000http://www.hotnews.ro/ultima_ora{color}|http://www.hotnews.ro/ultima_ora]{color:#ff0000}"
    title="Ultima ora">Ultima ora</a>
    </span>
    </div>
    </div>
    <div class="result_item">
    18.<a class="result_title" href="{color}[{color:#ff0000}http://life.hotnews.ro/stiri-natural-2716017-exercitiile-tai-chi-ajuta-tratarea-diabetului-tip-2.htm%22%3E%3Cstrong%3EExercitiile{color}|http://life.hotnews.ro/stiri-natural-2716017-exercitiile-tai-chi-ajuta-tratarea-diabetului-tip-2.htm%22%3E%3Cstrong%3EExercitiile]{color:#ff0000} Tai Chi ajuta la tratarea diabetului de tip 2</strong>
    <span class="stire">12 saptamani de exercitii Tai Chi au fost suficiente pentru a pune pe
    picioare sistemul imunitar al pacientilor, precum si pentru a le
    normaliza nivelul glicemiei, au constatat doua studii separate.</span>
    <div class="actualitate_footer align_text">
    <span>Miercuri, 2 aprilie 2008, 19:05
    &icirc;n <a href="{color[{color:#ff0000http://life.hotnews.ro/natural{color}|http://life.hotnews.ro/natural]{color:#ff0000}"
    title="Life | Natural">Life | Natural</a>
    </span>
    </div>
    </div>
    <div class="result_item">
    19.<a class="result_title" href="{color}[{color:#ff0000}http://economie.hotnews.ro/stiri-burse-2715830-bvb-propune-modificarea-conditiilor-listare-mentinere-companiilor-bursa.htm%22%3E%3Cstrong%3EBVB{color}|http://economie.hotnews.ro/stiri-burse-2715830-bvb-propune-modificarea-conditiilor-listare-mentinere-companiilor-bursa.htm%22%3E%3Cstrong%3EBVB]{color:#ff0000} propune modificarea conditiilor de listare si de mentinere a companiilor la bursa</strong>
    <span class="stire">Bursa de Valori Bucuresti (BVB) va avea consultari cu principalii
    actori ai pietei de capital cu privire la o noua modificare a Codului
    Bursei. Potrivit unui comunicat al institutiei, propunerile de
    modificare a Codului Bursei se refera la conditiilor pentru listarea si
    mentinerea companiilor la prima si a doua categorie a BVB.</span>
    <div class="actualitate_footer align_text">
    <span>Miercuri, 2 aprilie 2008, 18:47
    &icirc;n <a href="{color[{color:#ff0000http://economie.hotnews.ro/burse{color}|http://economie.hotnews.ro/burse]{color:#ff0000}"
    title="Economie | Burse">Economie | Burse</a>
    </span>
    </div>
    </div>
    <div class="result_item">
    20.<a class="result_title" href="{color}[{color:#ff0000}http://www.hotnews.ro/stiri-opinii-2715543-liniste-summit-afara-anarhistii.htm%22%3E%3Cstrong%3ELiniste{color}|http://www.hotnews.ro/stiri-opinii-2715543-liniste-summit-afara-anarhistii.htm%22%3E%3Cstrong%3ELiniste]{color:#ff0000}, e summit. Afara cu anarhistii !</strong>
    <span class="stire">Esti anti-NATO? Anarhist te numesti. Vrei sa fie desfiintata Alianta si sa protestezi impotriva ei? Pofta-n cui ca ajungi la zdup, te salta mascatii si te duc la sectie. Ai la tine afise, vopsea, inscrisuri, bannere, carioca, spayuri? Ai incalcat legea. Porti un tricou inscriptionat cu anti? Esti suspect. Nimic nu trebuie sa strice linistea fortaretei in care se desfasoara summitul. Politia romana a fost lovita in plina figura mascata de fobia anarhismului. Protestatari, go home, Bucurestiul e de necucerit, chiar si de pe frontul de la Timpuri Noi. Liniste, e summit! Doar zelosenia ii poate veni de hac.</span>
    <div class="actualitate_footer align_text">
    <span>Miercuri, 2 aprilie 2008, 18:21
    &icirc;n <a href="{color[{color:#ff0000http://www.hotnews.ro/opinii{color}|http://www.hotnews.ro/opinii]{color:#ff0000}"
    title="Actualitate | Opinii">Actualitate | Opinii</a>
    </span>
    </div>
    </div>
    <div class="paginare"><a href='http://www.hotnews.ro/arhiva/2008-04-02/1'><b>1</b></a> <a href='http://www.hotnews.ro/arhiva/2008-04-02/2'>2</a>&nbsp<a href='http://www.hotnews.ro/arhiva/2008-04-02/3'>3</a>&nbsp<a href='http://www.hotnews.ro/arhiva/2008-04-02/4'>4</a>&nbsp<a href='http://www.hotnews.ro/arhiva/2008-04-02/5'>5</a>&nbsp<a href='http://www.hotnews.ro/arhiva/2008-04-02/6'>6</a>&nbsp<a href='http://www.hotnews.ro/arhiva/2008-04-02/7'>7</a>&nbsp<a href='http://www.hotnews.ro/arhiva/2008-04-02/8'>8</a>&nbsp<a href='http://www.hotnews.ro/arhiva/2008-04-02/9'>9</a>&nbsp</div>
    </div>{color}
    {color:#ff0000} </div><!-- end center -->
    </div><!-- end center_side -->
    {color} <br/>
    <div id="footer">
    <div class="footerMenu">
    <div class="footerMenuLeft">
    <ul>
    <li class="josActualitate">
    <a href="[http://www.hotnews.ro/%22%3Eactualitate%3C/a]>
    </li>
    <li class="josEconomie">
    </li>
    <li class="josLife">

  • Java Regular Expression to grab html tags

    Dear all,
    I have written a regular expression in java to grab the pairs of html tags in a String. It worked fine except that it cannot handle space or new line. What have I done wrong?
    My regular expression (I would use <tr></tr> as an example):
    <tr[^>]*>(.*?)</tr>
    It would work for <tr><one>two<three></tr>
    but not <tr ><one>two<three></tr>
    or <tr> <one> two <three></tr>
    or <tr>
    <one>two<three>
    </tr>
    Thanks a lot in advance

    I have written a regular expression in java to grab the pairs of html tags in a String. I'll make one last-ditch suggestion that you grab a decent HTML parser, as the HTML specification allows for HTML tags that don't come in pairs. While I'm sure you will be able to eventually write regexes to handle this, it may be easier (depending on your requirements) to use tools to parse the HTML.
    Good luck!

  • How to disable html tags in richtext editor

    Hi All,
    I want to disable the html tags in rich text editor.I am able to disable the all components using the following code
    af:richTextEditor id="rte2" toolboxLayout="spellcheck"/>
    <f:facet name="spellcheck">
    <af:commandLink id="chek" text="Check Spelling" styleClass="linkcont"/>
    </f:facet>
    When page gets submitted i dont want all the html tags in it How i can achive this.
    Regards,
    Smaran

    Hi,
    I am not sure your question is complete as it seems to lack content, Anyway, did you try a value change listener to access the content and parse it for HTML tags?
    Frank

  • Unable to use HTML tags in the BPEL email component

    Hi,
    I am using BPEL email component to send mail notifications. I want the email should be in proper format.If I use HTML tags the workflow application build fails .It says invalid syntax for html tags.So, I removed the tags and just using the concat string operations as of now.To format i even tried '\n' like in java but it didnt help. Could you please let me know how do I achieve this?
    The JDeveloper version is 11.1.1.3 and SOA ,OIM both are 11.1.1.3
    The BPEL source code for the email content I configured is:
    <copy>
    <from expression="concat(string('AD Account access request has been rejected by manager.\n
    Here are some details about the request:\n
    Request ID : '), bpws:getVariableData('inputVariable','payload','/ns3:process/ns4:RequestID'),string('\n'),
    string('Employee First Name : '),bpws:getVariableData('empFName'),string('\n'),
    string('Employee Last Name : '),bpws:getVariableData('empLName'),string('\n'),
    string('Manager Employee ID : '),bpws:getVariableData('manager'),string('\n\n\n'),string('Thanks,\n IDM Administration')
    )"/>
    <to variable="varNotificationReq"
    part="EmailPayload"
    query="/EmailPayload/ns15:Content/ns15:ContentBody"/>
    </copy>
    Please suggest .
    Thanks,
    Piyasa

    Hi
    Here is the sameple email from BEPL email component. See if this helps:
    "<html>&#x0A;<body>&#x0A;<p>This is an automated message from the <b>Identity Provisioning Solution</b>. Please don’t reply to this email.</p>&#x0A;&#x0A;<p>An access request has been successfully submitted for <%concat(bpws:getVariableData('inputVariable','payload','/ns3:process/ns4:BeneficiaryDetails/ns4:FirstName'),' ',bpws:getVariableData('inputVariable','payload','/ns3:process/ns4:BeneficiaryDetails/ns4:LastName'))%> to access <%bpws:getVariableData('inputVariable','payload','/ns3:process/ns4:ObjectDetails/ns4:name')%>.</p>&#x0A;&#x0A;To view additional details of the request, login to the Identity Provisioning Solution.&#x0A;&#x0A;<br>Request ID: <%bpws:getVariableData('inputVariable','payload','/ns3:process/ns4:RequestID')%>&#x0A;<br>&#x0A;<br>&#x0A;<br>&#x0A;<br>Thank you,&#x0A;<br>Identity and Access Management&#x0A;</body>&#x0A;</html>&#x0A;"
    Regards
    user12841694

  • Html tags using javax.jws.WebService

    Hi,
    I am using javax.jws.WebService and I met a problem for html tags.
    In a String containing "<" and ">", the javax.jws.WebService implmentation of IBM transfered the String with "<" and ">" in the XML reply. How could this translation be avoided?
    Regards.
    Pengyou

    The XML content in the soap request looks like this:
    <myXml>
        <tagWithCdata><![CDATA[<test>123</test>]]></tagWithCdata>
    </myXml> The String "tagWithCdata" in the Java object looks like this: "<test>123</test>"
    And the marshalled XML in the soap response looks like this:
    <myXml>
        <tagWithCdata><test>123<test></tagWithCdata>
    </myXml>But I expect to have the same format as the soap request, i.e.
    <myXml>
        <tagWithCdata><![CDATA[<test>123</test>]]></tagWithCdata>
    </myXml>

  • HTML Tag Colors

    Is there any way to specify which tags get which colors for HTML tags (and to use this within a cfm page)
    If CFEclipse, you could specify <table> tags get "green", <input> tags get "orange", etc, but I'm not finding this capability in CFBuilder.  It seems to be an all or nothing deal (unless there's a way to specify the "keywords" within HTML -> Editors -> HTML -> Colors in preferences as is in some of the other Editors in CFBuilder)

    So - like - "not fit for purpose" then?
    That's my take.  I talked with a CFB dev at CFUnited '09 about this issue and it didn't sound like adding any DW/CFE'sh colorization was on the radar at that time.
    If there's not already one, I'll submit a feature request at http://cfbugs.adobe.com

  • Any external tool for HTMLB tags

    Hi all,
    we are having macromedia dreamweaver software for html tags
    i.e. it is a ready made software to develop HTML page, simply we will drag and drop desired fields and code will be generated automatically. My question is that is their such any ready made software for HTMLB, so we can use it in developing BSPs application.....if there are any such software plz send me the link to download the software....i will be thank u by giving points...
    thanks,
    Ali.

    Hi.
    This eclipse tool might have some support for BSP.
    http://www.ceon.com.au/abapeclipse/features.php
    I havn't tested it myself, but screenshots show how BSP editing is done with a preview window and some code completion.
    Perhaps not as nice HTML editor as dreamweaver but much nicer for ABAP development.
    Regards, Mikael

  • Filting html tags, css, and javascript with regex

    hi everyone,
    im writing a small application where a user types in a url, and the text of the webpage is displayed in a text area.
    ive got it to work, however it takes some time, and also alot of content i dont want is displayed - tags, scripts and sometimes css.
    initally i filtered out the html tags with a regular expression, but i still get alot of unwanted content.
    im not a confident java programmer, and the idea of parsing html, css and javascript is the scariest idea ever to me, so my next idea is to keep only everything between the <body> tags - everything above and below it is deleted - hopefully that should leave me only with the visible content on the site.
    ive messed around with regular expressions but i cant get it to work, can anyone help out?
    thanks alot,
    Torre

    Darryl.Burke wrote:
    I tried out the regexes I posted on the source of a forum page, which is not valid html (contains two each opening and closing body tags). With a bit of trial and error I was able to remove everything upto the first, and not the second, opening tag by using a reluctant qualifier, ^.*?, but couldn't for the life of me achieve removal of only the last closing tag, leaving the other, invalid one intact. How would you do that?Regexes always try to match the first occurrence of whatever they're looking for (the sentinel), and there's no way to change that behavior (but it would be handy if you could). What you have to do instead is make sure the rest of the regex can't match the sentinel. For that you need lookahead, and the simplest way to use it is to scan the rest of the text looking for the sentinel and, if it doesn't find one, go ahead and gobble up the remaining text: "(?is)</body>(?!.*</body).*$" However, if there are many occurrences of the sentinel, you could take a serious performance hit. Here's a much more efficient way: "(?is)</body>(?:[^<]++|<(?!/body>))*+$" After matching the sentinel, this regex gobbles up anything that's not the first character of the sentinel, or the first character as long as it isn't followed by the remaining characters of the sentinel. The advantages of this regex are that it never has to backtrack, and the lookahead is only applied when it's necessary, where the first regex applies it every time.

  • Converter for converting all HTML tags to JSF tags

    hai all,
    i am new to JSF. i need a suggestions to convert all my HTML pages to JSF pages bcoz i was already created more pages in HTML and now i want to convert all the pages to JSF. can u give any suggestion plz post it here or send me a mail to [email protected]
    thanks in advance,
    regards,
    V.Sabarish

    hi roman,
    thanks for ur reply. it converts the file but the links r not converting....so can u suggest me another way for converting a HTML tags to JSF tags.

Maybe you are looking for

  • Calculation of values in a dunning form (SAP Script)

    Hi Experts! I want to add values to a sum (dunning-amount + dunning-fee + interest) in a dunning form (SAP Script; Z150_DUNN_02).Therefore I'm using a subroutine (Z_FI_KX_DUNN_02_INTEREST) to summarize. Problem is the format of the output-field &Z_FA

  • Flash builder 4.7 not treating External linkage correctly

    Hi, I am refactoring the project I am working to external link assets(flash assets), so I can load them on runtime. This works in Flash builder 4.6 and you can observe a smaller .swf than if they are merged into code. In FB 4.7 However it seems to ig

  • How to pass parameters to an XSL for use in a transform (JSP/XSLT)?

    I have an XSL: style.xsl I have an XML: data.xml I want to do an XSL Transform on data.xml, using style.xsl, with parameter Language=en With Saxon you would do: saxon data.xml style.xsl Language=en But how would I do this with WL6.x, using the JSP XS

  • There's Video but no sound!

    So i have some Tv show on my MacBook, and when i go to watch them there is video but no sound. Quicktime prompts me that i need to download a codec but not which one. Which onw do i need?

  • Oracle_sid

    I tried to understand subtle differences btw instance_name,sid,db_unique_name,service_name.....gone through "http://www.dba-oracle.com/t_oracle_sid_instance_name_service_name.htm"..I have few questions.. 1) Can "oracle_sid" & "select instance_name fr