Find the LINE FEED and replace it.

Hi
I am using ORACLE 11g R2. I am having some text data in a variable as below :-
Variable = V_TEXT
V_TEXT :=
'/u01/oracle/data/file1.txt
/u01/oracle/data/file2.txt
/u01/oracle/data/file3.txt'I want to place an '|' (pipe symbol) at the end of each line. So the expected output is as below :-
'/u01/oracle/data/file1.txt|
/u01/oracle/data/file2.txt|
/u01/oracle/data/file3.txt|' I tried with replace() function and replaced return character i.e. CHR(10) with '|' but it gives me an wrong output and also at the end of last line we dont have an return character.
after searching a lot on internet I found that i can do this with the help of regular expression.
As far as i have studied : -
The line feed character is the last character in the line or we can say it is end of line. This character is noted in oracle as 'x0a'
I want to replace this character in every line and place an '|' symbol.
can anyone guide me how to do it ??
Thanks in advance.

Aha... Now that is a different expected output as in your original post ;-)
One way of doing it could be something like this:
declare
  v_text varchar2(32767) := '/u01/oracle/data/file1.txt
/u01/oracle/data/file2.txt
/u01/oracle/data/file3.txt';
begin
  v_text := regexp_replace(
               regexp_replace(v_text,chr(10)||'\s*'||chr(10),chr(10))
             ,'$','|',1,0,'m'
  dbms_output.put_line(v_text);
end;
/Inner regexp replaces "linefeed followed by zero or more whitespace followed by linefeed" with a single linefeed. So this removes the blank lines.
Then the outer regexp takes care of the | characters.
(It might be possible to wrap it up in a single regexp, though I can't think of a way just off hand ;-) )

Similar Messages

  • I want to change my news source from the BBC to something from North America. How do I find a new feed and site location?

    I want to change my Latest Headlines news source. How do I find a new feed and site location? I found the properties box for "Latest Headlines".

    You can visit your favorite news site or search Google for one and if it has a feed then you can click to orange RSS feed icon at the right side of the location to subscribe to that feed.
    CNN: http://www.cnn.com/rss/cnn_topstories.rss
    Google: http://news.google.com/news?output=rss
    New York Times: http://partners.userland.com/nytRss/nytHomepage.xml
    Reuters: http://www.microsite.reuters.co.uk/rss/uk/topNews/
    NPR: http://www.npr.org/rss/rss.php?id=1001
    Yahoo News: http://rss.news.yahoo.com/rss/topstories
    See also [[Live Bookmarks]]

  • Issue in Customizing the Logon Page and Replacing the Logon Panel Image

    I have facing problem in Customizing the Logon Page and Replacing the Logon Panel Image in Hyperion Workspace 11.1.2.1. I have tried multiple time.
    First Replacing the Logon Panel Image. I have following the steps given in admin guide of EPM workspace on page 25 and they are as follow
    To replace the image that is displayed on the logon panel:
    1 Create an image file named logon_panel.gif with dimensions that match previous image.
    2 Rename the installed version of logon_panel.gif to logon_panel.gif.original in
    %EPM_ORACLE_HOME% /common/epmstatic/bpmui/themes/<do for each
    theme>/images_global. Move the logon_panel.gif file that you created in step 1 to this
    directory.
    3 Clear your browser cache.
    Note: You do not need to restart the Hyperion Foundation Services - Manager Server.
    But still I am getting the same default image on log in page.
    The other problem I am facing is Customizing the Logon Page.
    I am following the steps given in admin guide of EPM workspace on page 17 and they are as follow:
    To customize the logon page:
    1 Follow instructions in the topic Extract a file in the Workspace Web Application.
    2 Backup file <temp directory>/war/WEB-INF/lib/bpmui.jar.
    3 Extract the contents of <temp directory>/war/WEB-INF/lib/bpmui.jar to <temp
    directory>/bpmui_jar/.. (*)
    4 Backup file <temp directory>/bpmui_jar/WEB-INF/classes/com/hyperion/bpm/
    Resources_en.properties.
    5 Edit file <temp directory>/bpmui_jar/WEB-INF/classes/com/hyperion/bpm/
    Resources_en.properties.
    6 Search for the property bpm.logonCopyright.
    Customizing the Logon Page 17
    7 Modify the text to the right of the equal sign. Use \n to get a new line.
    8 Save your changes.
    9 Repeat step step 1 through step step 8 for all the other Resources_xx.properties files for other
    locales.
    10 Jar the contents of <temp directory>/bpmui_jar/ to <temp directory>/war/WEBINF/
    lib/bpmui.jar.
    11 Continue with the topic, Re-package a file inside the Workspace Web Application.
    For the first part I am following
    Extract a file in the Workspace Web Application
    ä To extract files in Workspace Web Application:
    1 Stop the service for Hyperion Foundation Services - Managed Server.
    2 Backup file <EPM_ORACLE_HOME>/products/Foundation/workspace/
    InstallableApps/workspace.ear.
    16 Administration Tools and Tasks
    3 Using an unarchiving utility, extract the contents of <EPM_ORACLE_HOME>/products/
    Foundation/workspace/InstallableApps/workspace.ear into a <temp
    directory>.
    4 Create <temp directory>/war.
    5 Extract the contents of <temp directory>/workspace.war into <temp directory>/
    war.
    6 Update the file you are patching under <temp directory>/war. as direct in it.
    But I am not able to find file bpmui.jar in step 3 of above one (*). I have marked for your connivance.
    I am able to see these file in that directory
    dynamichelp.jar
    workspace.jar.
    Can anyone provide help on this. Platform I am using is LINUX

    You seem to have posted this in the wrong forum. This forum is for Oracle Enterprise Manager - not Hyperion.

  • Script : Line feed and extended line

    Hi,
    I have an issue in printing address in description column. What happens is the address line is too long and it goes into next column. The description column is second column. How can i split the line? and the splitted line should start from 2nd column.
    Ezhil.

    Hi
    Please check this link
    http://www.thespot4sap.com/Articles/SAPscript_layout_set_commands.asp
    http://www.scribd.com/doc/6739833/Sap-Scripts
    Hope you will find u r answer
    Regards
    Ruturaj

  • I would like to find the object change and to move

    Thank you very much, but
    Sayfaları, tek tek sayfalarını bakacak bu script belgede (3, 5, 7, ...) işlem yok
    I would like to object all page (height and width of the rectangle is known, the text frame) to move to find and replace
    The height and width of a rectangle with known or find text frame, changing the height and width, to move to a point
    I'm glad I sent you edit scprit
    var findX, findY, changeX, changeY, moveX, moveY;
    var diyalogWindow = app.dialogs.add({name:"RECTANGLE oR TEXT FRAME", canCancel:true});
    with(diyalogWindow){
      with(dialogColumns.add()){
    with(borderPanels.add()){
    with(dialogColumns.add()) {
    staticTexts.add({staticLabel:"FİND X"});
                         findX = textEditboxes.add({editContents: "10"});
                        staticTexts.add({staticLabel:"FİND Y"});
                          findY = textEditboxes.add({editContents: "10"});
    with(dialogColumns.add()) {
         staticTexts.add({staticLabel:"CHANGE X"});
                          changeX = textEditboxes.add({editContents: "50"});
                          staticTexts.add({staticLabel:"CHANGE Y"});
                          changeY = textEditboxes.add({editContents: "60"});
             with(dialogColumns.add()) {
         staticTexts.add({staticLabel:"MOVE X"});
                          moveX = textEditboxes.add({editContents: "100"});
                          staticTexts.add({staticLabel:"MOVE Y"});
                          moveY = textEditboxes.add({editContents: "10"});
    if(diyalogWindow.show() == 1) {
    var myDocument=app.activeDocument;
    var p;
    for(p=0; p < myDocument.selection.length; ++p) {
            myDocument.selection[p].move([changeX.editContents,changeY.editContents]); // ................... how contined ???

    https://forums.adobe.com/message/6714843#6714843
    this script
    app.selection  .paragraphs.everyItem (). spaceAfter = 1
    its make spaceafter = 1
    but how make
    1
    2
    3
    4
    5
    Each click, I get a continuous increase
    2014-09-04 12:14 GMT+03:00 vandy88 <[email protected]>:
        I would like to find the object change and to move  created by vandy88
    <https://forums.adobe.com/people/vandy88> in InDesign Scripting - View
    the full discussion <https://forums.adobe.com/message/6700008#6700008>

  • By asking for the function seek and replace [apple F] i get no display - so see nothing except the upper stroke. what is going on? and what can i do about it?

    by asking for the function seek and replace [apple F] i get no display - so see nothing except the upper grey line. what is going on? and what can i do about it?
    restarting doesn't work

    Does trashing the preferences help? See Replace Your Preferences

  • HT1178 I have set up Time Capsule to use with Time Machine.  When I open Time Machine it 'cannot find' the Time Capsule and I have the Select the Disk each time.  In the Next Backup tab it always says "When disk is connected" even though the disk is alrea

    I have set up Time Capsule to use with Time Machine but when I open Time Machine it 'cannot find' the Time Capsule and I have to 'Select the Disk' each time. In the Next Backup tab it always says "When disk is connected" even though the disk is already connected.

    Your pro doesn't matter.. I presume it is happily working.
    Your imac setup has got messed up because you changed from a local (my book being USB type I presume) to network drive. Did you do a clean install of Lion?
    Did you use the backup from the Pro on the imac? Otherwise I don't see how the Pro shows up in use previous disk. Where is Pondini when you need him??
    You cannot download Time Machine as an App and replace the current version. It is built into the OS.. the only way to do it is a clean install. Unfortunately that might be the only way around the issue.
    There is a number of issues that Pondini has covered in the setup issues of troubleshooting.
    This is the most relevant I think. http://pondini.org/TM/B6.html
    But look at the whole section B setup problems.
    http://pondini.org/TM/Troubleshooting.html
    If it was me, I would store all the info you need.. not using TM but using a straight copy of files.
    Then clean install Lion. I doubt any of these issues would exist if you had not installed Lion over existing setup or used a different backup.
    See if you can get Pondini to respond.. !!

  • How can we find the most usage and lowest usage of table in Sql Server by T-SQL

    how can we find the most usage and lowest usage of table in Sql Server by T-SQL
    The table has time stamp column
    StartedOn datetime
    EndedOn datetime

    The Below query has been used , but the textdata column doesnot include the name of the table ServiceLog.
    SELECT
    FROM
    databasename,
    duration
    fn_trace_gettable('F:\Program
    Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Log\log_148.trc',
    default)
    WHERE
    DATABASENAME='ZTCFUTURE'
    AND TEXTDATA
    IS
    NOT
    NULL
    --AND TEXTDATA LIKE 'SERVICE%'
    order
    by cpu
    desc; 

  • Table for finding the SHC numbers and PO numbers

    Hi Guys,
    Can anyone tell me where I can find the SHC number and PO number getting updated in one table.
    Also If I wanted to have both the data what should I have to do?
    Regards
    Srujank

    Hello Srujank,
    You can use
    1. Report : BBP_BW_SC2: Monitor shopping cart status
    2. From Table :  CRMD_ORDERADM_I get the SC item GUID & use this GUID in table BBP_PDBEI to get the follow on document (PO) number.
    Hope this helps.
    Thanks
    Ashutosh

  • I can't find the 2G, 3G and LTE options after updating to iOS8.1, can anyone help me with this? I'm using iPhone5s

    I can't find the 2G, 3G and LTE options after updating to iOS8.1, can anyone help me with this? I'm using iPhone5s

    I have check on my service provider about the correct APN settings, but unfortunately doesnt work still..

  • Hi,I have made a new Apple ID and logged in on my phone, on settings, but the app store is still using my old one. How do I get rid of the old ID and replace it with the new one?

    Hi, I have made a new Apple ID and logged in on my phone, settings > iTunes & app stores, but the app store is still using my old Apple ID. How do I get rid of the old ID and replace it with the new one?

    HAYDONISRAD wrote:
    ...  Maybe I'll stick with hers for now :-)
    OR...
    You could use your preferred Apple ID from now on, but you can still access your purchased items such as music, movies, or software using your other Apple IDs.
    From Here   http://support.apple.com/kb/HE37
    I have multiple Apple IDs. Is there a way for me to merge them into a single Apple ID?

  • I have stored everything on my Macbook pro in a external hard drive (Time Machine)  Now that we have "wiped the machine" I am told I can start it over and load ontent--apps, docs, etc from the hard drive, just plug it in, find the time machine and what?

    I have stored everything on my Macbook pro in a external hard drive (Time Machine)  Now that we have "wiped the machine" I am told I can start it over and load ontent--apps, docs, etc from the hard drive, just plug it in, find the time machine and what?    I need to know what to highligh, what to click on. 

    hirogliffix,
    take a look at this Apple page — in particular, the “Restoring data from Time Machine backups” section and its “Restoring your entire system from a backup” subsection.

  • How do I find the image name and media_link for an ubuntu image in the Gallery?

    I am trying to create VM using Python API.  
    I have a custom Linux image:
    image_name = 'cloudN-Azure-20150205-os-2015-02-05'
    media_link = 'https://portalvhds10ssz63zgvb9g.blob.core.windows.net/vhds/cloudN-Azure-20150205-os-2015-02-05.vhd'
    When I used this image to create VM, it failed.
    I would like to use the ubuntu 1204 image in the Gallery.
    How do I specify the image_name and media_link in my Python code?  Basically, where and how do I find the image name and media_link for an image in the Azure image Gallery?
    Thanks in advance...

    hi sir,
    Did you try to use "List OS Image"? we can get the property form the results:
    result = sms.list_os_images()
    for image in result:
    print('Name: ' + image.name)
    print('Label: ' + image.label)
    print('OS: ' + image.os)
    print('Category: ' + image.category)
    print('Description: ' + image.description)
    print('Location: ' + image.location)
    print('Affinity group: ' + image.affinity_group)
    print('Media link: ' + image.media_link)
    print('')
    Please try it. Any questions or it doesn't work, please let me know.
    Regards,
    Will
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • In Adobe Flash CS6, I have a blue box appearing around lines drawn with the line tool (and other tools like brush etc). I can't figure out how to disable.

    In Adobe Flash CS6, I have a blue box appearing around lines drawn with the line tool (and other tools like brush etc). Whenever I try to use a tool,  a blue box appears around the line and I have to double click it to manipulate it, which opens just that line in a semi burred screen where all the other objects are semi-grey in the background. I can manipulate this line in this screen but nothing else at that time which I could do about 5 minutes ago. For exampe, I no longer can join up 2 lines drawn by the line tool together. For some reason this started randomly (probably due to a accidental shortcut combination) and I just can't put it back to what it used to be. I have inserted a video hopefully showing what I mean. Any help would be appreciated.

    Thank you - Just what I needed

  • Dialog box says-"Bridge encountered a problem and is unable to read the cache. ... purge central cache" For one, I can't find the central cache and two, I've purged the cache in bridge. Shouldn't that help.

    Our Bridge has been acting very strange. It keeps giving a dialog box of "Bridge encountered a problem and is unable to read the cache. ... purge central cache" For one, I can't find the central cache and two, I've purged the cache in bridge. Shouldn't that help? There's just all kinds of weird stuff going on. I suppose it does have something to do with the central cache, so maybe someone can tell me where to find it.
    When I use the burn/dodge tool sometimes it drags and staggers and takes forever to complete whatever I'm burning/dodging. When I try to delete an image from the dock, it won't disappear but it won't display either.
    Any help would be appreciated.

    The Central Cache is the Bridge Cache.
    It's referred as the Central Cache to differentiate it from the individual folder's cache or even the individual image cache.

Maybe you are looking for

  • ITunes can't find the music - long post

    Here’s the situation; apologies for length, I want to get all the details down. The music collection: 8Tb (and growing) in lossless format, on an Ethernet network, accessed via the Mac Mini running OS 10.9.2 that’s my entertainment centre. The music

  • Adding a new field to the Address Data for a business partner

    Hi Experts, I am trying to add a new custom field to the address data (all structures and tables) that is linked to a business partner on SAP CRM via EEWB. Structure is the address structure wthin BUS_EI_EXTERN. Table is BUT020. I have been told that

  • Printing results in fully/partially blank pages

    I'm developing a Java application that generates printed output, and am having trouble with pages intermittently being printed partially or completely blank. The pages contain mostly a mixture of text and line graphics, and sometimes bitmap images su

  • Reg Vendor with two payment currencies- ERS

    Hi We defined two partner bank types in vendor master [Seerate Bank a/c one in USD, one in CAD] We have Schedule agreement created in USD When ERS invoice is posted its picking by default CAD bank a/c details, we wish to it picks USD bank a/c details

  • Compile error with IDLJ generated java files.

    When compiling the IDLJ generated java files, javac is not able to recognize org.omg.CORBA.ObjectHelper classs. Looks like the import is not finding this class. I have located these classes in rt.jar but including this jar in CLASSPATH gives a versio