Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Read HTML lable from textarea

Former Member
0 Likes
1,272

Hi all.

     I create a textarea in screen.These texts include HTML labels, for example:

    <p> El <strong>Portal del Profesional </strong>abc</p>

    

     he problem is that when I use the FM READ_TEXT to read the text in a report, it returns:

     <(><<)>p>El <strong>Portal del Profesional </strong>abc <(><<)>/p><(><<)>p>

     And then, the report cannot write the HTML text in the correct format.

Thanks in advance.

Regards.

1 ACCEPTED SOLUTION
Read only

Hvshal4u
Active Participant
0 Likes
1,229

Hi Xi ,

Use the below code :

data : p_char type string.

p_char = '<(><<)>p>El <strong>Portal del Profesional </strong>abc <(><<)>/p><(><<)>p>'.

REPLACE ALL OCCURRENCES OF REGEX '<[()]*>' in p_char with space.

REPLACE ALL OCCURRENCES OF REGEX '<[a-zA-Z\/][^>]*>' IN p_char with space.

write : p_char.

Regards-

Vishal

6 REPLIES 6
Read only

Hvshal4u
Active Participant
0 Likes
1,230

Hi Xi ,

Use the below code :

data : p_char type string.

p_char = '<(><<)>p>El <strong>Portal del Profesional </strong>abc <(><<)>/p><(><<)>p>'.

REPLACE ALL OCCURRENCES OF REGEX '<[()]*>' in p_char with space.

REPLACE ALL OCCURRENCES OF REGEX '<[a-zA-Z\/][^>]*>' IN p_char with space.

write : p_char.

Regards-

Vishal

Read only

Former Member
0 Likes
1,229

This message was moderated.

Read only

Former Member
0 Likes
1,229

Hi Vishal,

     Only replace it? If only to replace it ,the data line after forcibly will still have problems.

Thanks in advance.

Regards.

Jacky

Read only

Former Member
0 Likes
1,229

Hi Ravi,

     Because the system has converted the data format,so i think there should be a way to convert back,not just replace it.For example,the use of FM CONVERT_ITF_TO_STREAM_TEXT  to convert the data format,but there will be some special characters show.

Thanks in advance.

Regards.

Jacky

Read only

Hvshal4u
Active Participant
0 Likes
1,229

Hi,

Please use the logic and let me know if any issue.Try to check the same in debugging mode I am sure you able to solve it yourself.

Regards-

Vishal

Read only

Former Member
0 Likes
1,229

Hi Vishal,

     Thank u for the answer to my question.

     In my needs,it's enough to use the following logic.

     REPLACE ALL OCCURRENCES OF REGEX '<[()]*>' in p_char with space.

    

     Thank u very much.

Thanks in advance.

Regards.

Jacky