In the last article, we have discussed how string. Cause In a CSV file, if there is a extra space after the requirement tag, the hierarchy of the requirements is lost. highlight any number in this column with 'light red fill - conditional formatting' that is $7 (7 after $ is removed) or less - but to leave blank spaces unfilled. Since it is not an IDE, some of the neat things such as removing trailing white spaces are hidden from the menus. What's the best way to remove trailing whitespace from a string? For example: "John C. Thus all trailing spaces get eliminated. Java program to remove trailing whitespaces from a String. Often JavaScript is used to display string returned from back-end systems. The AnyEdit plugin can do this: http://andrei. Example: UPPER(“nasa”) = “NASA”. class pyspark. In LibreOffice, OpenOffice or Gnumeric (or any other spread sheet that supports find and replace using regular expressions). Replace both multiple whitespaces and tabs with a single space. Removes leading, trailing, and repeated spaces in text. If that is a problem, consider using the DATALENGTH (Transact-SQL) function which does not trim the string. This one has all three. Remove email indents, find and replace, clean up spacing, line breaks, word characters and more. So we can use the above logic and store the modified value in Input field. The first configuration option (named just "Whitespace Space") is the face of the non-trailing whitespace. StackOverflow does not respect the later, so I guess it could also ignore the former :P – Oriol Oct 17 '16 at 21:36. These strings have leading or trailing whitespace—spaces, tabs and newlines. Quotes are not sourced from all markets and may be delayed up to 20 minutes. The problem that I am facing, the N goes into the database with trailing. trim() method is defined under the String class of java. set shiftwidth sets the width for autoindents. I think that very few people would actually want what you're asking for (i. Removing whitespace characters from a string. To disable/enable features for a certain language package, you can use syntax-scoped properties in your config. The TRIM function is fully automatic. However, strtrim does not remove significant whitespace characters. Note, that we use StringBuilder. whitespace: a string specifying a regular expression to match (one character of) "white space", see Details for alternatives to the default. The following will remove trailing whitespaces whenever you save a file in Visual Studio 2008. Eliminate Trailing Spaces from Fields with KingswaySoft From time to time you end up with field values that contain trailing spaces. Word does not provide a straightforward way to remove extra spaces on lines. 12+ Find more free AppleScripts and info on writing your own at Doug's AppleScripts for iTunes. Example file: test space at back test space at front TAB at end TAB at front sequence of some space in the middle some empty lines with differing TABS and spaces: test space at both ends. Web content is often polluted with non-breaking spaces. This involves 2 changes in this script: it creates a virtualenv if we are not in one. The TRIM function will remove all extra spaces including leading space, trailing spaces and the extra spaces between words. remove trailing whitespace and newlines from pdf. Scala provides #trim method in its string class which helps to remove both leading and trailing white spaces. How to remove trailing whitespace on save. It’s easy to remove all whitespace from a string, but you’ll typically want to keep a single space between words. The below code removes trailing spaces, but for some reason it does not remove space from this, i clicked F2 and the space is still there, why does it work on some but not others?. There are a couple spaces between the words. Trailing spaces are line-ending regions containing at least one simple space, tabs, or both. Solved: Hi All, In data step we have STRIP function which removes leading and trailing spaces. There are two ways we can remove these. This wikiHow teaches you how to remove unwanted spaces from cells in an Excel spreadsheet. I have been working with the Jive tech support staff. We need to remove all the trailing and leading spaces from our Exchange 2000 public folders prior to migrating them to Exchange 2007 without removing the legitmate spaces. How to remove trailing whitespace on save. # + #### Any leading or trailing spaces on a line should be removed. Replace whitespaces with a single space but delete all tabs. A common use for the TRIM function is where you are using a VLOOKUP to join two sets of data. I'm often editing code where others didn't care about trailing white-spaces. They suggested that we verify the the post was opened as a question -- this one was. Remove Spaces from String in Python. In any case it'd be great to have the option to strip or not. In this tutorial you will learn that how to remove leading or trailing spaces from a text string in a cell in Excel. rstrip() ' Hello' >>> 'Ninja Turtles the movie '. This pattern should be all you ever need, but if you do want to abide by another definition to cover edge-cases, go ahead:. The TRIM function removes any extra spaces, including leading spaces, trailing spaces, and double spaces. How can I remove blank spaces in a text field? Some text fields have a lot of blank fields that need to be removed so that I can report only on the text. You can use TRIM or TRIMV to remove these trailing spaces prior to applying the RPAD function. It used to work with old PyCharm versions but the latest version does no longer strip all trailing white spaces in docstrings. I want to remove trailing whitespace at the end of all the lines in a buffer. String Arrays. Web content is often polluted with non-breaking spaces. One of the newest widget oriented visualization software dashing is gaining traction of-late. (according to some of. To remove trailing spaces in a source file we go to Source | Remove Trailing Spaces. What About Leading and Trailing Spaces in href values? The final thing I’ll mention here is that, technically, href attribute values (i. Example 2 – Quickly Remove Leading and Trailing Spaces from a Range of Cells Suppose you have a data set as shown below where there are leading and trailing spaces:. left-trim Removes all whitespace from the top of the code block. This could also be scaled to find the. There are several ways, depending on what you want and what Emacs version you have. I didn't know if I should open a new issue or not so please let me know. A character is anything you can type on the keyboard in one keystroke, like a letter, a number, or a backslash. I can't reproduce the experience, so it is hard to debug. Learn why Excel TRIM function cannot remove non-breaking white space and what solution to use. The following example demonstrates how to use RTRIM to remove trailing. LEN excludes trailing spaces. You can also bind the Remove Trailing Whitespace command to a key if. Sometimes, string returned from backend consists of either leading or trailing whitespace and in some case contains whitespaces at both ends. You could probably solve it by using e. Removing blank spaces before and after PHP tags – Part II 23 Nov 2007 1 Jun 2008 ~ Ritesh Agrawal Last month I posted a PHP script to find all the blank spaces before and after PHP opening (). ? i'm trying to submit an application to a website that wants me to submit information about my school, gpa, and etc. specifies one character to remove from column. Remove all trailing spaces and tabs: string (string) result (string) TrimF: Remove all leading spaces and tabs: string (string) result (string) Trim Leading Trailing: Returns a string with leading and trailing whitespace removed: string (string) result (string) Upcase: Change all lowercase letters in a string to uppercase: string (string) result (string). Sometimes you may want to avoid tabs, or just see where tabs occur. If you also want to remove instances of two or more white space characters inside the string, then use a pointer to find the beginning. 1 Attachments 2017-10-07 13 17 38. The leading and trailing blank spaces in a title or footnote can be preserved by specifying the attribute ASIS=ON. This will remove trailing spaces, but if you put the resulting string back into an A50 field, it will be padded with spaces/blanks to fill out the 50 characters: TRIM('R',IDOCNUMBER,50,' ',1,'A50') You could try putting the TRIMmed value into a variable length field: TRIM('R',IDOCNUMBER,50,' ',1,'A50V'). SparkSession (sparkContext, jsparkSession=None) [source] ¶. A backslash character is used to “escape” the white-space character. To show (highlight) trailing whitespace, see ShowWhiteSpace. if you want to remove obolete whitespace and double spaces you may use a combination of trim() and replace(). How to Remove Whitespace From Python String | 5 Examples (strip, rstrip & lstrip) Raw text data is often not properly formatted and contains a lot of redundant whitespaces at the beginning and end of strings as well as double blank characters within the text. Trim Leading and Trailing Whitespace Problem You want to remove leading and trailing whitespace from a string. remove-trailing Removes trailing whitespace on all lines. The TITLE field has trailing spaces. Like trim() but removes only trailing (right) whitespace. To show (highlight) trailing whitespace, see ShowWhiteSpace. I'm new to regex and sed so this is probably easy but I just can't do it without destroying the Address section. 22, 10 · · Code Snippet. This article focuses on removing whitespace from both sides of the string. Trim() function and its not working on Rich Text box. If you do not specify trim_character the TRIM function will remove the blank spaces from the source string. As mentioned in other posts, the default TRIM only removes spaces - not tabs, formfeeds etc. The RTRIM function eliminates trailing spaces from a source string and returns the result. Further reading Regular expressions is a gentle introduction to the regexp package with cheat sheet and plenty of examples. Description. You must remove all the leading and trailing spaces from Exchange 2000/2003 user names, group names, and Public Folder names prior to migrating them to Exchange 2007 or Exchange 2010. Luckily this can be fixed very easy & fast. 2 and PyCharm does not strip trailing whitespaces within Python's docstrings. % Uncomment this block to remove trailing whitespaces only from each non-empty line. SQL SERVER - TRIM - How to remove leading and trailing characters/Spaces from string May 20, 2013 by Muhammad Imran LTRIM and RTRIM are very useful functions when it comes to trim the left side or right side of the string spaces respectively but if you need to trim spaces from both sides , you need to create a user defined function. How do people removing leading and trailing blanks in stata? Thanks!. You may want to condense multiple blank lines into a single blank line. Check Remove trailing whitespace. All of the usual math operations and special methods apply. 1 Attachments 2017-10-07 13 17 38. If there is a space URI that is numeric (does not happen if alpha numeric), and the user dials it (ex '8885555 '), CMA will pass '888555 ' to the CMS and it does not match the space. The example for 'sub' shows how to remove the trailing white spaces, but I still can't figure out how to remove both trailing and leading white spaces because I can't find any documentation for what "+$" means or what "\\s+$" means. Stack Exchange Network Stack Exchange network consists of 175 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. We then identify which words to remove by setting deciding to remove k amount of words, find the count of word that is k deep in the list, and then removing any words with that amount or more of occurrences in the vocabulary. Also, it is doing the rounding operation also. Here are a few ways to remove trailing whitespaces in Linux command-line environment. The generated version. Re: Remove trailing whitespace from OpenOffice Spreadsheet cell Sorry to wake the dead, but there is an easier way of doing this. Or folders that are empty. I'm having difficulty with some strings of varying 'meaningful' length from a different database (not under my control) that I am trying to trim in my vb. Trim(Char[]) Trim(Char[]) Trim(Char[]) Trim(Char[]) Removes all leading and trailing occurrences of a set of characters specified in an array from the current String object. The value to tablename variable has leading and trailing white spaces. It assumes that the string to be trimmed never contains two hash "##" characters in a row. When it’s just a single space, most of the time they don’t cause any problems, but sometimes they won’t fit on the same line as the punctuation and they force. This involves 2 changes in this script: it creates a virtualenv if we are not in one. I am getting a value from a csv file using CUT command, however the command extracting the records with trailing spaces. CRXI Edited by: Burton Roger on Feb 10, 2009 5:48 PM. Hi All, I am binding data to Gridview. We will check each character of the string using for loop. Java program to remove trailing whitespaces from a String. For example, deblank removes trailing space and tab characters, but does not remove the nonbreaking space character, char(160). IsEmpty/IsBlank - checks if a String contains text; Trim/Strip - removes leading and trailing whitespace. If the two sets of data have been entered or imported with space character discrepancies then TRIM will sort this out for you. Using Forums > Off-Topic Posts (Do Not Post Here) the trailing space is still there. Example: TRIM(“ Harry ”) = “Harry” xx. Once you. In every training class we do, I learn stuff from students. One place where the Python language really shines is in the manipulation of strings. This is mentioned in the spec: The href attribute on a and area elements must have a value that is a valid URL potentially surrounded by spaces. Features like automatically removing trailing white spaces at the end of the line exist in most IDEs, but not so obvious in Sublime Text. replace function is used to strip all the spaces of the column in pandas Let’s see an Example how to strip leading and trailing space of column and all the spaces of column in a pandas dataframe. In some other languages there are functions called ltrim and rtrim to remove spaces and tabs from the beginning and from the end of a string respectively. You will learn how to delete leading and trailing spaces in a cell, eliminate extra spaces between words, get rid of non-breaking white space and non-printing characters. Thanks megane9988 you for the patch, but code refactoring should not be done just because we can. Quickly remove all leading and trailing spaces with Kutools for Excel. How to preserve trailing spaces – Learn more on the SQLServerCentral forums. If you want to remove leading spaces only, or trailing spaces only, or want to remove all excess spaces including non-printing characters, please go to. This technote provides steps to remove spaces from a comma separated file (CSV) which affect the hierarchy of requirements when imported into IBM® Rational® RequisitePro®. Show trailing whitespace. There are many ways you can end up with these extra spaces – for example, as a part of the data. This makes it really easy to get rid of those annoying invisible characters. Method One A simple command line approach to remove unwanted whitespaces is via sed. To remove leading spaces and tabs the 'Find what' and 'Replace with' strings are:. remove trailing whitespace and newlines from pdf. Note whether any DNs appear together with a backslash character (\) or if any leading or trailing white spaces appear in the DN. class pyspark. For example, if the current string is " abc xyz ", the Trim method returns "abc xyz". Note whether any DNs appear together with a backslash character (\) or if any leading or trailing white spaces appear in the DN. The feature sure helps keep the R source nice and clean (not quite clang-format clean) but does it really have a point in Rmarkdown?. This is the right side. 2, rstrip lets you pass in what characters you want to remove from the end of a string. Some examples: " Lua " -> "Lua" "Lua " -> "Lua" " Lua" -> "Lua" " Lua Language " -> "Lua. Disallows trailing whitespace at the end of a line. To strip trailing spaces when you save: (1) Remove the default Save shortcut (Ctrl+S), then (2) assign the "Trim Trailing and save" macro to Ctrl+S. The Apache OpenOffice User Forum is an user to user help and discussion forum for exchanging information and tips with other users of Apache OpenOffice, the open source office suite. Enclose a literal character in single quotation marks. So if I'm using two spaces at the end of my string, it only trims one. For ltrim function, start scanning characters from. In this way all spaces get removed by '\0' and left most '\0' becomes last character of string array. Is there a common setting on Gridview which will make. A simple transpose and then back to cross-tab does not work as I will lost all of my field names & vales. remove trailing whitespace and newlines from pdf. The idea is to implement the DocumentEvents_DocumentSaved subroutine to remove trailing whitespace. You can remove the trailing zero by using floor. png) + ![Python. Trailing whitespaces are annoying and also git likes to complain about them, that's why extension such as this could be useful. SAP ABAP Program UMG_REMOVE_TRAILING_SPACES (Remove trailing spaces from string fields) - SAP Datasheet - The Best Online SAP Object Repository. 1) When running a request with values enclosed by white spaces (e. Hi, I import data into excel sheet from a data source. Hi, this command write all servers name into TXT file, the problem that after every name the command add blank spaces, how can I remove them?. The regex i wrote seems only to remove leading spaces at the begging of the file and trailing spaces at the end of the file. Define the function removePunctuation that converts all text to lower case, removes any punctuation, and removes leading and trailing spaces. I have tried to use strip but that will also take off leading white space and I want to keep that. The entry point to programming Spark with the Dataset and DataFrame API. See actions taken by the people who manage and post content. In this article we will learn how to remove leading spaces in Microsoft Excel 2010. A character vector. remove-indent If the whole code block is indented too much it removes the extra indent. There are a couple spaces between the words. TRIM(text) text - The string or reference to a cell containing a string to be trimmed. This example will help you to trim only trailing whitespaces from a String in Java. In this post, I am sharing a TSQL script to remove the trailing characters from the Number value in SQL Server. Any leading or trailing spaces on a line should be removed. Remove Whitespace from C# Strings Posted by Timm 37 Comments » You probably knew that you can use the String. Episode 283 shows you how to solve this problem. Save your new profile. If you have unnecessary spaces it may prevent working of some functions, filtering etc. The TRIM function has a single argument, the text to trim. Please let me know if you need any more details. These have a special appearance in Writer but not in Calc. Attachment(s): Screen Shot 2015-08-26 at 2. Then query for it using the = and <> operators, using different numbers of trailing spaces: [crayon-5d9cc9beae3ec319974595/] SQL Server simply ignores the trailing spaces: The mind-blowing part to. And all the trailing spaces after the text string have been removed. whitespace: a string specifying a regular expression to match (one character of) “white space”, see Details for alternatives to the default. StackOverflow does not respect the later, so I guess it could also ignore the former :P – Oriol Oct 17 '16 at 21:36. Using Excel's TRIM function, or a shortcut key to trigger Excel's search and replace feature, you can easily remove those unnecessary spacing. You need to be able to iterate over the elements of the array so you should look at map and for loops. *There is a way to run Clean Up when saving files, but I cannot find it at this moment. Hi Friends, When I am puttting 2 images side by side, I am getting some space around the images in IE but its fine with Mozilla. Whitespace in the regular expression that isn’t inside a character class is ignored. Hi everyone I am attempting to remove whitespace from a pdf which contains vector graphics. Column A has trailing spaces. InDesign has a buit-in GREP Find/Change Query called Remove Trailing Whitespace which is: \s+$ It's more powerful than I want. هذا البيج برعايه ولا حدااااااااااااااا https://www. According to the tech support, one of the archives is failing to back up due to the possibility of trailing spaces on file and folder names. Note: VBA Trim function does not remove the non-whitespace characters – such as newlines (vbNewLine, vbCrLf) etc. APSTUD-1255 Provide option to remove trailing whitespace in formatter settings. - thdoan Mar 3 '15 at 4:33 1 And to remove the default Save shortcut, double click on Shortcut field and then select None from the combo box. Recently had a need to remove the spaces from a string in powershell. 3 quick ways to remove extra spaces between words or delete all spaces from Excel cells. Actually, Eclipse has functionality to remove trailing whitespace, but for some reason they don't expose it by default. strip function is used to remove or strip the leading and trailing space of the column in pandas dataframe. If you also want to remove instances of two or more white space characters inside the string, then use a pointer to find the beginning. I'm often editing code where others didn't care about trailing white-spaces. You find the scope on top of a grammar package's settings view. How can I remove the trailing & leading spaces even if it is in brackets from the cell? The following code is fine but for MS Access. Disable "Remove trailing whitespace" defaults in Atom editor. In a new cell, type in =trim(A1). How to remove the blank spaces in a string , Remove Extra Spaces from a String , remove all the space inside the string , Replace multiple spaces in a string to single space, remove all the space inside the string , c#, vb. Data sent to the Loftware Print Server can sometime contain leading or trailing spaces, which can cause undesired printing results. Now it’s time to remove the “(remove)” string and would do the below. 💖 Support my projects. The FreeVBCode site provides free Visual Basic code, examples, snippets, and articles on a variety of other topics as well. I am having a file that contains different strings, which in turn are name of folders. The built-in open function is the preferred method for reading files of any type, and probably all you'll ever need to use. 107 Views. However, with An and AnV fields derived from An fields, the trailing spaces are part of the data and will be included in the output, with the padding being placed to the right of these positions. If you use Eclipse I suggest to use the AnyEdit Plugin - this is able to remove trailing white-spaces. Remove Trailing spaces in a string or a column when TRIM/RTRIM does not work Very often we need to remove trailing spaces from a text in a varchar variable or a column. SELECT RTRIM('Removes trailing spaces. The Function. 1 "becomes "192. TRIM(" lorem ipsum") TRIM(A2) Syntax. The unittests are used for more involved testing, such as testing job cancellation. Remove spaces in Excel cells – leading spaces, trailing Extendoffice. I am trying to remove the trailing commas at the end but not remove the commas in between the string. My settings are set to strip trailing spaces on modified lines only but still, this is not the expected behavior. Rather, SQL ignores them. newStr = deblank(str) removes trailing whitespace and null characters from str and returns the result as newStr. org/core/handbook. Note that turning off this setting will remove any existing underlined trailing spaces from your document. This is, normally, undesirable so we should check for rogue spaces. Symptom: Ad hoc call placed from WebClient when the space exists on the server. Check Remove trailing whitespace. By wrapping a TRIM function around the lookup value, we remove the extra spaces and enable the VLOOKUP function to make its match. Removing trailing and leading spaces May 16, 2009 at 06:41 AM | 1. Replace both multiple whitespaces and tabs with a single space. The L stands for left. This makes it really easy to get rid of those annoying invisible characters. A simple command line approach to remove unwanted whitespaces is via sed. The issue was that we have a requirement to output data to a text file and ensure that there are x number of spaces at the end of each row. How do I remove leading and trailing spaces from a string? I have a string with many spaces at the beginning and the end. For example, deblank removes trailing space and tab characters, but does not remove the nonbreaking space character, char(160). To remove all kinds of spaces, you can use the Microsoft Visual Basic. trim(); The trim() method will remove both leading and trailing whitespace from a string and return the result. We can eliminate the leading and trailing spaces of a string in Java with the help of trim(). In some other languages there are functions called ltrim and rtrim to remove spaces and tabs from the beginning and from the end of a string respectively. The TRIM function has a single argument, the text to trim. Now it’s time to remove the “(remove)” string and would do the below. I have a table with a column called Country, the country data value can be either 'N' for North America and 'C' for Canada. We can use combination of string’s find_first_not_of() and find_last_not_of() functions to remove leading and trailing spaces from a string in C++ by finding the index of the first and last. , that you want to remove. A protip by ahacop about osx and bash. The unusal gaps between these concatenated fields are trailing spaces. 1) Iterate through all characters of given string, do following a) If current character is a space, then move all subsequent characters one position back and decrease length of the result string. For portability, ‘whitespace’ is taken as the character class [ \t\r ] (space, horizontal tab, line feed, carriage return). If you also want to remove instances of two or more white space characters inside the string, then use a pointer to find the beginning. 6 example Remove Whitespace. The solution should be able to remove them and also handle punctuation marks. Use the trim function. It’s easy to remove all whitespace from a string, but you’ll typically want to keep a single space between words. And these trailing spaces are not easy to find out and affecting cell sorting, calculating, or other operations. The complete list of posts in the series is available in the document Code Snippets: A Blog Series. SparkSession(sparkContext, jsparkSession=None)¶. It is extremely disruptive to be honest. My incoming data is like this. For something as simple as ‘s/foo/bar/g’ sed is obviously a great choice. There are several ways, depending on what you want and what Emacs version you have. " @ceejayoz is on the money: making destructive changes a default is nonsense. Use the Python regexp_replace module to remove any text that is not a letter, number. vimrc to highlight trailing whitespace in to remove trailing white-spaces automatically while. skipinitialspace, but it I think it only applies to leading whitespace. The conversion should be done in-place and solution should handle trailing and leading spaces and also remove preceding spaces before common punctuation like full stop, comma and. Strip trailing spaces on save in Visual Studio My preferred windows text editor is TextPad. 62, and it doesn't remove tabs or spaces on an otherwise blank line; and it doesn't remove similar trailing whitespace on other lines in the script. Note that this will apply ALL clean up rules. I dont want to remove the leading and trailing spaces in the varchar variable. The source file itself can be updated by using the -i option of sed. Manipulating files is an essential aspect of scripting in Python, and luckily for us, the process isn’t complicated. trimws {base} R Documentation Remove Leading/Trailing Whitespace Description Remove leading and/or trailing whitespace from character strings. var a = " hello world ". How do I locate a Public Folder path that is hidden due to trailing spaces ? Answer: If MigrationWiz fails to locate a Public Folder path that you know exists, the problem may stem from a trailing space in the folder's file path. Using Excel's TRIM function, or a shortcut key to trigger Excel's search and replace feature, you can easily remove those unnecessary spacing. I'd review a patch restricted to C/C++ files in js/src and the subdirectories js/src/{vm,methodjit,tracejit,shell}. Why does bash remove in $(cat file)? if you don't quote the result it will be tokenised into multiple arguments on white space. SQL SERVER - TRIM - How to remove leading and trailing characters/Spaces from string May 20, 2013 by Muhammad Imran LTRIM and RTRIM are very useful functions when it comes to trim the left side or right side of the string spaces respectively but if you need to trim spaces from both sides , you need to create a user defined function. Parquet considerations: Parquet files generated by Impala and containing this type can be freely interchanged with other components such as Hive and MapReduce. TRIM() is a T-SQL function that removes the space character char(32) or other specified characters from the start or end of a string. The VBA TRIM function only removes the extra space at the start and end of the text in a cell. 1 "becomes "192. The replace_string can contain up to 500 backreferences to subexpressions in the form , where n is a number from 1 to 9. [SPARK-7899] [PYSPARK] Fix Python 3 pyspark/sql/types module conflict. The following command deletes all spaces and tabs at the end of each line in input. Remove Extra Whitespace or Tabs. There are lots of ways to remove the problem starting with hitting the delete key way too many times. Luckily this can be fixed very easy & fast. Is there any way to remove only trailing spaces?-- Kai :-). In this post, I am sharing a TSQL script to remove the trailing characters from the Number value in SQL Server. Replace whitespaces with a single space but delete all tabs. New here?. Trailing whitespace removal extension. My actions when saving a file now consist of: 1. Returns a new DataFrame that has exactly numPartitions partitions. Re: Remove spaces from a text field Niall O'Donovan Jul 29, 2010 9:04 AM ( in response to Niall O'Donovan ) Thinking about it, testing for the length of the newText will allow you to only reset the field if the space bar is the first character.