One Star

[resolved] regex to replace html tags

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
1 ACCEPTED SOLUTION

Accepted Solutions
One Star

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 "<.*?.>" .
6 REPLIES
Community Manager

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
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

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
Community Manager

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
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

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 :-)
One Star

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
One Star

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 "<.*?.>" .