Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Need to work out for Regular Expression in WebFOCUS.

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Need to work out for Regular Expression in WebFOCUS.
 Login/Join
 
Member
posted
Hi All,

When I am reading A column from Relational Database in Table, It has some data with html tags. While reading A column through master file. I want to remove all html tags in A column and then need to pull the data into EXL2K.

Anyone, Can you help me out on this.

Thanks,
Veeramani K

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8
Windows, All Outputs
 
Posts: 27 | Registered: December 14, 2017Report This Post
Virtuoso
posted Hide Post
Take a look at the character functions like REPLACE. https://webfocusinfocenter.inf...r/source/replace.htm


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Member
posted Hide Post
Hi HabakNYC,

Thanks for your reply. I want to remove html tag with generic code.

For Example,
"LT/spanGT" - I can able to replace the exact value with space.

But, "LTspan style="font-family: Arial, sans-serif; font-size: 10pt;"GT" these kind of html tags are not generic.. so we need to apply some expression to remove multiple html tags from same paragraph.


WebFOCUS 8
Windows, All Outputs
 
Posts: 27 | Registered: December 14, 2017Report This Post
Virtuoso
posted Hide Post
You can combine REPLACE with IF-THEN-ELSE or DECODE. Look up Expressions in the Doc. https://webfocusinfocenter.inf.../source/ExpRef16.htm

https://webfocusinfocenter.inf...er/source/decode.htm


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Expert
posted Hide Post
Look at the TOKEN function as that should allow you to identify the start and end of non HTML parts of the string.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Expert
posted Hide Post
A slightly twisted way to do this would be to hold the data in a hold file (format alpha) then run something like SED on the hold file to remove the tags.

Note: if its windows, you will need to install GNU core utilities for windows.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Guru
posted Hide Post
Hi, I have seen an example of this. On the table a virtual field could be built that strips out the html tags and then you could report against that.

Fernando


Prod WF 8.1.04, QA WF 8.2.03, Dev WF 8.2.03
 
Posts: 278 | Registered: October 10, 2006Report This Post
Member
posted Hide Post
Dear All,

For Example, As mentioned below DESCRIPTION_DATA values need to remove all html tags. When I ran the below code, Data output is getting generated in EXL2K. But, Description_Data column, It's applied html styling and data is splitting into multiple lines in EXL2Kreport.

Requirement: I want to remove all different kind of html tags in virtual field. And then wanna to display a record into single line with excel report output.

please help me out on this.



My Code:
DEFINE FILE CAR
DESCRIPTION_DATA/A2000 = '<p><span style="font-family: Arial, sans-serif; font-size: 10pt;">AGSouth is a member-owned grocer warehouse and also a member of Retailer Owned Food Distributors & Associates (ROFDA).</p><p><br></p><p>The team supports the new account boarding for this group. </p>';
END
TABLE FILE CAR
PRINT COUNTRY CAR MODEL  DESCRIPTION_DATA
WHERE RECORDLIMIT EQ 1;
ON TABLE HOLD FORMAT ALPHA

END
-RUN
TABLE FILE HOLD
PRINT *
ON TABLE PCHOLD FORMAT EXL2K
END
-RUN
-EXIT
  


WebFOCUS 8
Windows, All Outputs
 
Posts: 27 | Registered: December 14, 2017Report This Post
Expert
posted Hide Post
quote:
Look at the TOKEN function as that should allow you to identify the start and end of non HTML parts of the string.


T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Expert
posted Hide Post
… or use nested REPLACE functions.

Also, stating "WebFOCUS 8" in your signature doesn't help anyone in replying as some functions are not available in early versions of 8 whereas they are in later versions. So be specific in your signature.

One final point, have you tried any of the suggestions here, searched the forum for the key words such as REPLACE, TOKEN etc.? You should at least look into some of the suggestions rather than post an example which shows no attempt to try out some of the suggestions made.

It's easy to provide a solution for you but ultimately that doesn't help you to learn. By pointing you to specific key words, you should be able to make some headway and thereby learn something in the process.


T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Need to work out for Regular Expression in WebFOCUS.

Copyright © 1996-2020 Information Builders