• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » [resolved] regex to replace html tags

#1 2009-10-22 15:26:42

joe
Guest

[resolved] regex to replace html tags

Tags: [html, regex, tag]

Hello,
I want to use a regex with treplace component to erase all the HTML tags, I've try tried "<.*?.>" but it doesn't work.
Can you help please ?
Thank you

#2 2009-10-23 05:35:22

shong
Talend team
Registered: 2007-08-29
Posts: 10310
Website

Re: [resolved] regex to replace html tags

Hello
Can you give us an exmaple of your string and what are your expected result?
I tested a simple example on TOS3.2.0 and it works well.

Best regards

          shong


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the leader of open source data management and application integration solutions!

Offline

#3 2009-10-23 09:55:09

joe
Guest

Re: [resolved] regex to replace html tags

For example :

I have :
<TAG>my text<TAG>

And I want, with treplace component to have just :
my text

#4 2009-10-23 09:59:03

shong
Talend team
Registered: 2007-08-29
Posts: 10310
Website

Re: [resolved] regex to replace html tags

Hello
Yes, it works fine on my machine.
please log in as a member of forum and load some screenshots of your job.

Best regars

         shong


Uploaded Images


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the leader of open source data management and application integration solutions!

Offline

#5 2009-10-23 10:50:23

joe
Guest

Re: [resolved] regex to replace html tags

Hello chong,

Oh You are right, "<.*?.>" is OK I don't know why It didn't work first, maybee I didn't wrtie "<.*?.>" exactly... sorry :-)

#6 2011-12-16 17:13:12

tiagoamoreira
Member
Registered: 2011-05-05
Posts: 10

Re: [resolved] regex to replace html tags

Hello,
I have the same issue but with several html tags in my string, something like this:
Text<span class="tx"><strong>Text<br /><br />Text</strong></span>

I can't have a good result with your solution with search "<.*?.>" . I also change remove de check in Entirely Match.


Thank you

Offline

#7 2012-01-09 21:44:33

pbel
New member
Registered: 2011-03-13
Posts: 8

Re: [resolved] regex to replace html tags

Hi. I guess the screenshot by Shong could be missleading. At least in my version it works only when using the !!!Advanced Mode!!! section with "<.*?.>" .

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » [resolved] regex to replace html tags

Board footer

Powered by FluxBB