|
Mailing Lists
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
Easy Regex question?
This should be easy.Che Vilnonis 03/12/10 04:26 P Scratch that... I figured it out!Che Vilnonis 03/12/10 04:30 P do you mind sharing the solution please?Carol F 03/12/10 07:53 P Should be able to do this:andy matthews 03/12/10 11:31 P I tried it on:Carol F 03/13/10 09:05 A Rereplace(html, "<table>.*?</table>", "", "all')Bobby Hartsfield 03/13/10 10:03 A Carol, I used...Che Vilnonis 03/15/10 09:00 A Thanks Bobby and Che!Carol F 03/15/10 12:04 P This should be easy. How do I remove all text between <table></table> tags from a larger string? Thanks, Che Scratch that... I figured it out! This should be easy. How do I remove all text between <table></table> tags from a larger string? Thanks, Che do you mind sharing the solution please? ----- Excess quoted text cut - see Original Post for more ----- Should be able to do this: REMatchNoCase('<table>[^>]+</table>', myString) do you mind sharing the solution please? > > Scratch that... I figured it out! > > This should be easy. > How do I remove all text between <table></table> tags from a larger string? > > Thanks, Che > > > > I tried it on: <html><head></head><body>text<table>whatever</table></body></html> but it's returning this string in an array <table>whatever</table> instead of <html><head></head><body>text<table>whatever</table></body></html> I guess I can do arrTable = reMatchNoCase('<table>[^>]+</table>', myString); for(a=1; a <= arrayLen(arrTable); a++){ myString = replace(myString, arrTable[a], ""); } but is there an easier way? On Fri, Mar 12, 2010 at 8:29 PM, andy matthews <lists@commadelimited.com>wrote: ----- Excess quoted text cut - see Original Post for more ----- Rereplace(html, "<table>.*?</table>", "", "all') Or Rereplace(html, "<table>[^>]+</table>", "", "all') I tried it on: <html><head></head><body>text<table>whatever</table></body></html> but it's returning this string in an array <table>whatever</table> instead of <html><head></head><body>text<table>whatever</table></body></html> I guess I can do arrTable = reMatchNoCase('<table>[^>]+</table>', myString); for(a=1; a <= arrayLen(arrTable); a++){ myString = replace(myString, arrTable[a], ""); } but is there an easier way? On Fri, Mar 12, 2010 at 8:29 PM, andy matthews <lists@commadelimited.com>wrote: ----- Excess quoted text cut - see Original Post for more ----- Carol, I used... reReplaceNoCase(myHTML, "<table.*?>.*?</table>", "", "ALL")> Rereplace(html, "<table>.*?</table>", "", "all') Or Rereplace(html, "<table>[^>]+</table>", "", "all') I tried it on: <html><head></head><body>text<table>whatever</table></body></html> but it's returning this string in an array <table>whatever</table> instead of <html><head></head><body>text<table>whatever</table></body></html> I guess I can do arrTable = reMatchNoCase('<table>[^>]+</table>', myString); for(a=1; a <= arrayLen(arrTable); a++){ myString = replace(myString, arrTable[a], ""); } but is there an easier way? On Fri, Mar 12, 2010 at 8:29 PM, andy matthews <lists@commadelimited.com>wrote: ----- Excess quoted text cut - see Original Post for more ----- Thanks Bobby and Che! ----- Excess quoted text cut - see Original Post for more -----
|
July 31, 2010
|
Latest Fusion Authority Articles
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||