Regular expression to remove the space in the HTML tag

Hi all

My HTML string is as below.

Select ' < CityName > RICHMOND < / Nom_ville >< StateCd > ABCD CDE< StateCd / >< CtryCd > CAN < / CtryCd >< CtrySubDivCd > BC < / CtrySubDivCd > ' double Str

Output desired is

< CityName > RICHMOND < / Nom_ville > < StateCd > ABCD CDE< StateCd / > < CtryCd > CAN < / CtryCd > < CtrySubDivCd > BC < / CtrySubDivCd >

I want to remove these spaces of the tag value box with only spaces otherwise leave it as what. Please help to implement the same using regular expressions.

Hello

We don't know what you want.  This site seems to be formatting your message in a weird way.

As the statement

SELECT «...» "THE DOUBLE;

without formatting, to show your entry and after the exact output desired friom as, with as little in shape as possible.  It might be useful if you use some character like ~ instead of spaces (just for viewing; we will find a solution that works for spaces).

To remove the text which consists of spaces and nothing else between the tags, you can say

REGEXP_REPLACE (str

, '> +<>

, '><>

)

How is this string generated?  Maybe there is an easier and more effective way to keep the bad wrtings sub off the chain in the first place.

Tags: Database

Similar Questions

  • regular expression to remove the zeros on the right

    I need a regular expression to remove the zeros after the decimal point. I tried (?.)<=\.\d+?)0+(?=\D|$) but="" i="" get="" a="" error="" about="" look="" behind="" not="" a="" fixed="" length="" or="" something="" like="" that.="" i="" am="" not="" a="" regex="" expert="" and="" i="" was="" wondering="" just="" how="" to="" do="" this="" with="" regular="" expression="" or="" some="" other="">

    Z.K. wrote:

    [...] or some other way.

    I tried and I tried but I couldn't crack with a regular expression, so I took the easy way.  The first match found pattern the comma and the other removes the zeros to the right of the rest.  It is not discriminate between numbers and all the rest, though.

  • Remove the HTML tag to convert the site in CSS

    My site use any CSS and I need to change that. Is there a quick way to remove all the HTML code but leave in the links? I can copy the text via a browser, but I lost all the links to the images.

    Thank you

    "align" isn't a tag - it is an attribute. As I suspected, your best bet is
    to start again.

    --
    Murray - ICQ 71997575
    Adobe Community Expert
    (If you * MUST * write me, don't don't LAUGH when you do!)
    ==================
    http://www.projectseven.com/go - DW FAQs, tutorials & resources
    http://www.dwfaq.com - DW FAQs, tutorials & resources
    ==================

    "bastiat" wrote in message
    News:gefeta$6LL$1@forums. Macromedia.com...
    > I can't get this to work with the tag "align".

  • Using regular expressions to store the first 3 letters of a string

    Can anyone help with regular expressions?

    The problem:

    I have a contact field which is holder of a value of campaign here is an example of how we look at:

    EMC | TEACHER | HRSUB | June2012-may-01

    I need to store the first three letters of the code in another field of contact, the first three letters are not a defined value and may change in different codes.


    I have next to no experience with regular expressions, so I am struggling to set up cloud connector Eloqua - here's a screenshot:

    A few tips on how to set up?

    This should do the trick, although I would recommend that make you a few tests more using http://regexpal.com/

    ^|\| (.*)$

    Chris

  • Regular expression TO validate the name of column

    Hi all

    I want to write a regular expression to validate the name of column names.i.e enterted must follow the convention of valid column name
    contain only A - Z, a-z, 0-9, _, $, and #.

    Please someone help me to do this.
    Padma

    Hey padma.

    Regular expression TO validate the name of column

    to set jaspx for example in the Validation number:

    **

    If your use na na... chain mention you model as etc. from A to z...

    otherwise if the two method nt answer using java Scrpit na... it's better ground for you.

    If however hepatitis is any querys na msg me... If possible I try best,.

    Thnks,
    Suresh V

    Published by: V Suresh on April 2, 2012 16:55

  • How can I use a regular expression to validate the email address

    How can I use a regular expression to validate the e-mail address.

    var emailExp:RegExp = /([a-z0-9._-]+?) @([a-z0-9.-] +). ([a - z] {2,4});

  • Regular expression to remove a single carriage return character

    Hi all

    What is the regular expression to remove only one character to return to a text string. I have something like this:

    1

    (two returns)

    2

    and I want to delete only one of the characters turn it over so I'll go

    1
    2 (one after the other

    I know / r but ot deletes all of the text string.

    Thanks a lot for any help

    Try something like:
    (in my message window):
    s = "a" & RETURN & RETURN & "two".
    placed s
    l = [s]
    put re_replace (l, "(?)")<=\r)\r", "g",="">
    Place the [1]
    (exit):
    -"a".

    two ".
    -1
    -"a".
    two ".

    I don't know how effective the situation described above could be for research, but
    You can also try:
    put re_replace (l, "\r\r", "g", RETURN)
    or:
    put re_replace (l, "\r{2"}, "g", RETURN)
    However, these last 2 only work in the situation where there
    exactly 2 returns you want to replace with a single DECLARATION - the first
    replaces any number of multiple returns with one RETURN

    It is possibly more effective than the first - it will replace again
    all multiple with a single; but it will unnecessarily replace one
    RETURN character with one character in RETURN - but I'm not a regular expression
    Expert:
    put re_replace (l, "\r+", "g", RETURN)

  • Remove the html export to CSV

    Hi all

    I added a column on an international registration using apex_item.textarea. When I export to CSV, I get the html code in my excel cell
     SELECT
    apex_item.textarea(3,column_val, 2, 30) 
    
    which when exported to excle shows :
    
     '<textarea name="f03" rows="2" cols="30" wrap="VIRTUAL" readonly="readonly" >' || column_val || 
    Some please you suggest me if it is possible to remove the HTML for export to CSV.


    Thanks in advance,
    RD

    Published by: RD on November 21, 2011 13:46

    It is the technique I use.

    1. create 2 identical columns, one with HTML code and the other without.

    2. can conditionally display columns, one to display in the web page and the other to display in the download. This can be easily done by using the value of demand, for example

    Condition type: request is NOT contained in the Expression 1

    Expression1: CSV, PDF, RTF, XLS

    I hope that does the trick for you :)

    Simom

  • BlackBerry smartphones remove the bilingual "tag.

    How can I remove the bilingual 'tag' that appears at the bottom of every email that I send? Thank you!

    Here you go:

    Thank you

    Bifocals

    http://bis.na.BlackBerry.com/HTML?brand=Bell

  • Remove the video tags?

    I downloaded a few vintage movies - some have video tags, that some do not

    I order them all by using the file name
    WMP12 ordered them to Tag the video (if they have one) or name of file if they are not
    Tried to delete the video tags that I thought was a success, but they reappear whenever I reset the wmp database, reinstall windows, or access it from another PC = its not to delete the actual file tags, only from the WMP database
    Anyone know how to remove the video tags perminently
    Even better if I can delete them "mass"

    No, tags are stored in the file itself.  WMP can change its local database, but you will lose those changes whenever you reset (so do not reset there is a response).  But to strip out of the file itself, you'll need a program that can edit videos.

  • How to remove the .html of my site?

    How can I remove the .html from a site, the homepage is not a .html but it can be entered and it takes on the same page, want it so none of my pages have the .html as the home page (I don't know how I have no .html on this page)

    Please be descriptive, yet simple, I can work with dreamweaver, but I'm very new to sites etc.

    You misunderstood my post.

    You do not create a folder named "index.html" at all.

    You create the same name as the pages that they contain folders.

    Then, you create a file named "index.html" inside each folder.

    Contact-us/index.html

    Buttons / index.html

    = your homepage index.html

    Info/index.html

    IRC/index.html

    links/index.html

    Stream/index.html

    Vote/index.html

  • Regular expression to remove space after the tag &lt; a... &gt;?

    Hello

    I'm relatively new to using regular Expressions, but am in need who will help me find all the tags < a... > with space immediately after this tag and replace it with the exact same tag, but not space after the tag < a... >.

    Thus, for example, a regular expression that there is:

    < a href = "somelink.html" > Somelink < /a >

    as well as:

    "< a href =" # "MM_swapImgRestore" onmouseover = "MM_swapImage (' sub-nav_button_professional_portal',", ' images/sub-nav_button_ professional_portal_f2.png', 1 ') "> Somelink < /a >

    And just remove the space in the hyperlink.  Does anyone know how to do this?

    Find-

    \ (.*)\

    Replace-

    $2

    Post edited by: Murray * CPA *.

  • Regular expression to extract the date

    Hi all

    Please show me how can I extract date of statement, that date has four forms such as
    2008-08-08 or 08/08/2008 or 2008-agu-8 or 8.8.2008

    the follwing query can extarct in this form 08/08/2008.

    SELECT REGEXP_SUBSTR ("the Conference will be on 08/08/2008 ',' [0-9] {1,} / [0-9] {1,} / [0-9] {2,}'") FROM dual;

    concerning
    Isabelle

    Published by: Isabelle on 29 July 2012 10:17

    Specifically, he writes that

    the date has four following forms: 2008-08-08 or 08/08/2008 or 2008-agu-8 or 8.8.2008

    then why you will keep nagging on 10/11/12?

    @OP: here is a starting point, as I understand it:

    with dirtydates as (
    select 1 myrow, 'The date is 8.8.2012' mydate from dual union all
    select 2 myrow,  'The date is 19.Aug.2012' mydate from dual union all
    select 3 myrow,  'The date is 20-08-2012' mydate from dual union all
    select 4 myrow,  'The date is 21-8-2012' mydate from dual union all
    select 5 myrow,  'The date is 22/8/2012' mydate from dual)
    
    select myrow, mydate,  regexp_substr (mydate , '[0-9]{1,2}[[:punct:]]([0-9]{1,2}|[[:alpha:]]{3})[[:punct:]][0-9]{4}' ) datesubstr
    from dirtydates
    order by 1
    ;
    
         MYROW MYDATE                  DATESUBSTR
    ---------- ----------------------- -----------------------
             1 The date is 8.8.2012    8.8.2012
             2 The date is 19.Aug.2012 19.Aug.2012
             3 The date is 20-08-2012  20-08-2012
             4 The date is 21-8-2012   21-8-2012
             5 The date is 22/8/2012   22/8/2012              
    
    5 rows selected.
    

    It's a regular expression simple-thing. You can use: punct: or the list of the ones you want, like [.-/]

  • Remove the HTML from a string

    I have some data which are recorded by a rich text editor, but I need to display it in a datagrid without HTML tags.

    Someone at - it a regular expression for the elimination of all of the HTML in a string?

    Y at - it another way to do this in flex.

    Thank you

    Nevermind I found it. In case anyone is interested.

    [var myPattern: RegExp = /<[^>] * > / g
    txt = txt.replace(myPattern,"")

  • Remove the Finder tags in more than 10 items at a time

    Is it my setup or a remove the tags in the files of more than 10 changed in OS X 10.11?

    I used to add or remove tags at will. But now it seems that I can only take off the mark max 10 files at once via ctrl + click or Finder > file > Tags... With more than 10 points, the delete tag option is not available.

    If I want to remove the brand more than 10 files, I have to ctrl-click > read the summary information (more than 40 items will automatically in this mode), THEN batch-deletion of tags.

    I noticed that today, as well. It works fine for 1 to 10 items, but when you select that item 11 (or), it highlights all the tags, as if you have all the applied, rather than just a you have on them.

    Seems like a bug to me, but I'm not sure.

    I've found a workaround, if:

    Click on the word "Tags"... "above the points colored. Then, in the white field where the current tags assigned to this item, click the tag you want to delete, and then press the delete key.

Maybe you are looking for

  • where can I find the breakdowns on firefox?

    I'm trying to get these pop up ads to stop, find the diagnosis and help buttons

  • Can I use a wildcard character in a function?

    I want to search only for values that are not empty. Can I use wildcards for this? Here is an example. The data table above changes over time and fill empty values. I wish the bottom table is always current, with just the value more far to the bottom

  • Issue of Mac Mini 2014 SSD

    I'm not too familiar with the configuration of current storage of the Mac Mini. If the reader of the merger is not a true merger but combines a PCIe m2 with a HARD drive. However, I would like to know if buy you one that comes with a PCIe SSD out of

  • Telephone number Facebook replaces all other contact phone numbers

    The title pretty much everything said. I have a facebook contact who has added their phone number to facebook. This phone number is only available when you view the contact through the contact application and when typing his name in the phone app. Be

  • Path of the DLL

    A vi need to call a dll. Can I know where to place the dll. The vi is inside a vi library. Later perhaps need compile all the screws in exe. Any suggestion, thank you.