delete a random amount of extra spaces from string

Hello I'm a string input that sperates a table of data with an amount random spaces.

Is it possible to replace all the sequences of space by space?

for example

CPU PID MEM

15.689 12.2 6610

21.8. 156-6611

(if the spaces are random)

I have ried replaces the double spaces with single spaces a total of 8 times in the list, but for some reason which is also (somewhat) deleting simple spaes as well and im not sure why.

You can do this with a single search and replace String.  You must enable regular Expressions for this function (with the right button of the function, choose Regular Expression).  The regular Expression '+' (space followed by a sign +) will match one or more spaces - son from that in the search string.  Son of a single "" ((espace) space) in the replacement string, true Set "replace all", then run the function and it will replace all multiple spaces (from the current line) by a space.  If you want to manage several lines in the string, enable this option as well.

Bob Schor

Tags: NI Software

Similar Questions

  • How to remove extra spaces

    Hello

    How can I remove the extra spaces from a string.

    with t as 
    (select 'Abc      DEF   hig     ' str from dual)
    select * from t;
    

    The query above returns

    ABC DEF hig

    I want that output voltage

    ABC DEF hig.

    Basically, I want to do an update on a table column. How can I write the update statement to delete extra spaces in a column.

    update t
    set str = trim(regexp_replace(str, ' {2,}', ' '))
    where ...
    
  • Removing spaces from a string

    I have a string where there is a particular sequence, I want to replace.

    The sequence is ' / p e r.

    I tried replaceAll ("-p e r," ""); Tried to replace the charsequence, but doesn't have too much work.

    I am able to replace / by replaceAll("\\\","")

    Somehow if I put string a = "/ p e r ' and

    a.Replace ("" p e r ", pr) then came out / pr.

    But I read this to a BLOB field and there spaces between the two string operations fail somehow.

    Can someone help me on this please. I'm stuck for some time

    Please also let me know if this isn't the right group, because I don't have an answer during my last post here

    See Delete white spaces from strings in Java - Stack Overflow

  • delete extra spaces in the column of the table

    How can Hi I remove extra spaces in the column of the table for example if the table column is store as "ÄAAAAA" how to remove this extra space

    This is the column I have what it takes to remove extra spaces
    select SUBTYPES  from tablesubtype;
    am in
    Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE Production 11.2.0.3.0
    AMT for Solaris: 11.2.0.3.0 - Production Version
    NLSRTL Version 11.2.0.3.0 - Production

    Published by: adf0994 on 03/12/2012 11:30

    Published by: adf0994 on 03/12/2012 11:42
    UPDATE tablesubtype
       SET SUBTYPES  = TRIM (SUBTYPES);
    

    RTRIM do it alone will not be enough coz it takes away only right spaces and NOT left those.
    I guess in your case do a PLATE will be more advantageous to be safe and avoid left spaces in the future.

    For the intermediate spaces... try this.

    UPDATE tablesubtype
       SET SUBTYPES  = REGEXP_REPLACE (SUBTYPES, ' ', '');
    

    Hope this helps,
    Vanessa B.

    Published by: Vanessa B December 3, 2012 14:33
    -added regexp

  • Deletion of user account for disk space

    Dear Sir or Madam:

    Deleting a user will represent to free up more disk space on Windows XP?

    This situation applies to Windows 7 and Windows 8?

    Please reply back soon.

    Thank you.

    A "user account" in itself takes up very little space.  But once the user first logs on, Windows creates a 'profile' so that the user who can occupy a lot of space.  The profile includes all files used on the user's desktop and files under "My Documents" folder of the user (among others) which may be quite large, but includes everything what preferences and user files.

    In Windows XP, you can see the amount of space used by each user profile to:

    Right click on "My Computer"-> properties-> (Advanced tab)-> settings (in the user profile Section)

    If you have permission, you can select a profile and click on the 'Delete' button to free up disk space.  He recreated the next time the user logs on but delete everything that the user files.

    In Windows 7, the same screen can be obtained from:

    Right click on "Computer"-> properties-> Advanced System Settings-> (Advanced tab)-> the settings in the user profile Section.

    HTH,

    JW

  • Amount of disk space available on the disk hard keeps fluctuating.

    I have a Compaq CQ2103WM-B desktop running Windows XP, hard disk Go 139.  I started to receive notices of high memory use, began to receive notices of disk space is low. I ran the cleaning disc several times, it has been very slow, constantly showing only 2 bars, sometimes for hours. He finally released the space and I have deleted several programs and files, emptied the trash. After a few minutes the amount of free space started going down again. For several days, I kept repeating this process, but keep decreases the amount of free space on the disk. Now, it fluctuates to the amount of free space on the disk every few minutes. I downloaded and ran CCleaner, it frees up space and again it has disappeared in a few minutes. He got so low that I can't watch videos, use system restore, download other software or software upgrades (like Norton), cannot download pictures from my camera or save files in programs such as Corel Draw. Right now is 3.97 MB free space, he went down in the KBs, sometimes it goes up, but it changes even if I do nothing. I scanned for viruses and malware, Norton managed to reach space, but it lasted only a few minutes. I don't know anything else to try. Would it be a software problem, the malware that Norton cannot detect, the hardware, or if my system has been hacked and someone uses free space on my computer? Any information would be appreciated.

    In disk clean up, look for the button "other options" above I think it is, go to the

    the bottom of the next page, look for "System Restore" cleaning, this eliminates all but the last

    restore, and then mount the disk clean up. In addition, with a 139 GB hd, you must also have video/music

    files on the C: drive, perhaps to burn them on a cd. In addition, in my c: drive-count, R.click, open,

    Do scroll through folders & see what take place, install a slave drive can be

    you are the answer. With this, you can move all data from the user to the slave instead of having

    C: drive handle it all.

  • extra spaces added (that I can't get rid of) when you use STHeiti fonts.  What can I do?

    Hello

    Lhen I use the font I want to use (STHeiti), extra spaces added automatically - spaces which, moreover, I can't "delete" - after each apostrophe (or a single quotation mark).  See screen grabs below:

    example 1.png

    Here's another example:

    example 2.png

    Do you know how I can make these spaces go away?  When I do a search on the internet (InDesign STHeiti), I see that others have had other problems with this font... relating to a finished project export in pdf and to print.

    In the context of discussions about this, one person said that police STHeiti "is installed as part of the Apple operating system and is probably intended for on-screen display". "

    , But someone from another adds: " " the font is installed, by default, on all Mac 10.4 and higher (possibly further than that, but lets go with what we know), to open the file to the printer on a mac this will have the font available


    I'm on my Mac, but (not yet ready for the printer), then why I have a problem using this font?

    I know I could use another font, but this STHeiti is really nice!

    Thanks for any advice,

    Malcolm

    If you want to continue to use this font you can uncheck the box use the quotes on Indesign > Preferences > Type and extra spaces disappear.

  • deletion of snapshot and recovery of space

    I am running VMware Fusion on a Mac Book Pro/Snowleopard.  I initially install a 20 GB partition.  Over the past three years, I took 6 shots and I use now 69 GB.  I want to delete some shots, but I want to be sure that I won't spoil all my data on Windows XP.

    Can anyone give me a suggestion on the question of whether I should remove the last snapshot first or start from the first.  I'm guessing this will consolidate back to my original VM.

    I also want to make sure I can get the 40 GB of space.

    Thanks for the help in advance.

    Without explaining in detail why, however I have already said the best way to go about it and the route that I am proposing is the best way if or not you free up space on the internal disk and create the new destinationDisk.vmdk on it or on the external hard drive this route and the methodology and the reasons to go this route are infinitely better that you try to free up space to delete all snapshots You seem however you mind going about it you are somewhere else, so by all means, do it you are average.

    If you go about it your way then you will need the first backup of the Virtual Machine, so in the event that a problem occurs when deleting snapshots, which can and is happening, you have a way to recover.  generally speaking with monolithicSparse hard you will release no less then max the hard little more of extra space for aerial work, an addition size a few extra GB should cover.

    In your present circumstances my way is much faster and also safer, then remove it snapshot method because it does not require first backup the source since it will access in a read-only manner and the resultant hard will read the source and write the destination in a single cycle, unlike the snapshot method remove requiring reading and writing for each snapshot.  In addition, the new destinationDisk.vmdk can be made a splitSparse in the same operation that will be better in the future that you are running low on space you need only 2 GB more an extra pocket space for overhead operational to delete snapshots in case they get to immediately as the current situation you are in.

    In any case, it's your choice the previously linked document covers the joke of the method, I proposed and the am did try to help.  Sorry but when someone whats to go about it in an ignorant way vs the smart way, I can't continue to waste my time.

  • Remove the extra space of a long document

    Hello

    I've seen a number of find/replace and GREP formulas to do similar things. I have NO scripting language or coding experience and have worked to understand GREP.

    So I'm a little afraid to use it because I don't know what all the modifiers call (I have a few neat GREP cheatsheets print as Mike Witherell I can absorb up to get a good reference)

    I need something I can copy and paste into find/replace or dialog GREP that will do the following in less than 12 steps (we hope) without doing something as catastrophic as the removal of all my paragraph marks (which I almost did with someones GREP expression)

    1. No space before a comma, period, exclamation point, question mark, colon, semicolon
    2. A space only after any of these
    3. A space before an opening parenthesis and a space after the closing parenthesis
    4. No space before the closing parenthesis or after the opening parenthesis
    5. Remove double or extra spaces (en, em, etc.)
    6. Remove comma before parentheses
    7. Remove all white space after a paragraph mark

    I think that's it

    I found this one recently (perhaps Jongware?)

    [~ m ~ > ~ f ~ | ~ S ~ s < ~/~,~3~4%] {2.

    From my limited understanding addresses em, in, flush and hair, space nonbreaking, space figure, third space - not sure of the rest. It's really way over my head.

    I know it will be a piece of cake for you guys

    Thank you

    I was hoping Jongware would come in with something really elegant (and maybe he'll still) but in the meantime, my approach would be to start by eliminating all multiple spaces except paragraph returns and forced line breaks. This appears to do:

    Find (\s)(\p{space_separator}|\t) + and replace it with $1

    This leaves the first space and will remove the following spaces to a line or a paragraph break (and not completely tested, but I guess that other kinds of breaks) is encountered, leaving the jump line or paragraph intact.  Note that this will destroy the tables built with tabs (as opposed to the 'real' tables) with several tabs between the items, and it does not alter a single space before a line or paragraph break.

    Then I would remove the whitesapce at the ends of paragraphs, etc.:

    Find (\s)(\n|\r) and repace with $2 seems to do, and it also seems to leave several returns (I don't know if you want to delete these) and work with the other breaks as well (again, not fully tested). The \s$ and replace it with nothing more simple, removes the first return to a sequence of two-back and seems to ignore e other types of breaks completely.

    At this stage avoid any several spaces other than possibly empty paragraphs. If you want to get rid of these, you can run find/replace list script by the integrated switchis refers to the single request of return in the dropdown, find/replace.

    So now you find the opening of single and double parentheses, square brackets or braces quotes and remove space after them, if it exists:

    Find ([\[\{\(~{~[])(\s) and replace it with $1

    and finally to remove any white space before your selected punctuation and the closure of the above case:

    Find (\s)([.,;:!\)\]\}~}~]]) and replace it with $2

    The last two queries will probably also work with look-bhind for the first and to come to the second (putting classes in the expressions of the eyes) and repalcing with nothing, but I don't know which method is the most effective. The last request might also be missing a space and an apostrophe or mistakenly remove a space before a work that begins with an apostophe (again, not tested). and is ignoring straigh citations of any type, because they are ambdextrous and may want to space on each side.

    I hope that the forum does not spoil one of these phrases...

  • How to remove the extra space of oracle database column

    How to remove the extra space of oracle database column. I would like to clean up the column in the database by deleting the extra space is entered by the dataentery people.

    When I run the query:
    SELECT
    ROWID, C.CODETABLE_ID, C.CODEVALUE_ID, C.DESCR, LENGTH (C.CODEVALUE_ID).
    C.OBSOLETE_DT, C.RECORDSOURCE, C.CREATED_DT,
    C.CREATEDBY, C.LASTUPDATED_DT, C.LASTUPDATEDBY
    OF CODEVALUE C
    Where LENGTH (C.CODEVALUE_ID) > 6

    the data type is varchar2 and I would get rid of the any extra blank space added to the column. in my case, if the length is greater than 6

    Hello

    user452051 wrote:
    Thanks for the reply. Why should I have this line?

    AND codevlaue_id! = TRIM (codevalue_id) - see note below
    ;

    I just changed my post when you posted this. The explanation is there now:

    Frank Kulash wrote:
    ...
    The condition "codevlaue_id!" = TRIM (codevalue_id)"does not change the results of everything, but it can make the most effective statement if there are lines where codevalue_id is on 6 characters long, but contains no additional space. It will prevent the triggers from firing and redo the data generated.

  • extra space strikes next to the address of the Web site

    I had just updated my Firefox to the latest version (29.0.1), and it restarted, as soon as I noticed hits extra space next to the space where you type the address of the site. The extra space seems to be the lock with the address, because I can't move the extra space when you try to customize the toolbar (like how you can't move the address). I would try the "restore default" Customize, and does not remove the space. The extra space is not the search bar, and does not seem to use the extra space, so I wonder what's the point really? or if it's a random bug?

    Thank you!

    How do you move the search bar as it seems that Firefox continues to see her here and reserve space.

    Start Firefox in Safe Mode to check if one of the extensions (Firefox/tools > Modules > Extensions) or if hardware acceleration is the cause of the problem.

    • Put yourself in the DEFAULT theme: Firefox/tools > Modules > appearance
    • Do NOT click on the reset button on the startup window Mode safe
  • Why is there extra space above google search results?

    When I do a search on google, an excessive amount of white space appears above the search results, I have to scroll down the page to see the first choice. Just started happening today.

    Suite response cor - el will lead you to find that Autopager is the cause of this.

    I saw it on 2 different PCs, with 2 different solutions!
    Long story short (note that between each test, I restarted firefox) I think that the problem is in the 'norm' for google, wind Li.

    My advice is to use the full version of Autopager, right-click on the icon of the AP > uncheck the 'active', then our for something and create your own rule (you'll probably have to create your "blind" rule because it is possible that the blue test button will not work). After that the restoration of the 'active' State and the problem should be fixed.
    That did the trick on a W7/firefox Desktop 3.6.18/AP 0.7.1.0

    Prior to this on a laptop Windows XP/firefox 3.6.18/AP 0.7.1.4 I used "auto", "verify the information on the page" and said yes to use a rule (jeau I think), but he started that after i unchecked the "uncover the corresponding rules online. I don't know why.

    In both cases, I stopped using the standard, that's why I think that the problem is there.

    No need to delete cookies, clear cache or use the standard theme or relatives already open tabs.

    Hope that helps!

  • Add the space from one partition to the other

    I have three partitions on one external drive.

    I have reduced the space on a partition and would like to add that extra space for another partition.

    Is this possible?

    No delete and re-create the partition immediately below you shrank.

    (139113)

  • After you import an image (.jpeg) file for the Photos on my Mac app, can I safely delete this image file to save space on my hard drive?

    After you import an image (.jpeg) file for the Photos on my Mac app, can I safely delete this image file to save space on my hard drive?

    Yes, you can remove the file from the imported image, if you have imported the image as managed.  IE preferences in ave Photos settled on "import: copy items to the photo library" being the default.

  • Windows is losing large amounts of storage space without telling me

    In recent weeks I've been watching my local disk drive (c) (only the petition on that computer) to see if I was using storage space. I noticed that I am losing a large amount of storage space. AVG disk space analysis, I have 176 GB of files in my local disk (c). My windows Explorer, however, I have 335 GB of files on my local drive (c). Which means there are 159 GB of files in my PC that I never new existed, and I can't find where. My concern is that it is a form of Malware, like in the last 24 hours, I've lost 15 gb + space, even if I haven't downloaded something.

    I apologize if it was a little hard to follow, as I found it hard to explain. If anyone knows what it is, if it is in fact something, please share your information with me. Thank you.

    Riley

    There could be lots of things like backups, restore points, etc.  There is a 3rd party app called from Jam software Treesize (free) which will tell you what is using that space.

Maybe you are looking for