Questions tagged [trailing]

Trailing characters are characters at the end of a string that should be removed for reason (eg. trailing zeros in "0.5000", trailing spaces in "hello ", trailing slash in a URL, trailing newline character, etc.).

This tag should be used for questions related to strings formatting issues, either when the goal is to parse the string or to display it. However context may be very different from one question to the other, and this tag covers a wide area.

217 questions
0
votes
0 answers

X-Path outputting trailling zero

The mission here is to output the final value in 5 decimal places, even if the decimals stop < 5 places, '0' is to be concatenated to it. For example, x = '7.317' -> '7.31700'; x = '8.14' -> '8.14000'; x = '1.2' -> '1.20000'; x = '1' ->…
Vincent
  • 209
  • 2
  • 9
0
votes
1 answer

Trailing spaces plsql

I need to find out the records with trailing spaces. I tried to build a query by using Length(rtrim), however it is not returning the required records. e.g. abc " abc " abc …
Sujagni
  • 1
  • 1
  • 1
  • 1
0
votes
3 answers

Remove Multiple Trailing Characters in SQL Server - Oracle equivalent to Trim (Trailing)

I have a table with a field that acts like an array for some front-end processing and that is the result of concatenating 9 columns from a different flat table. The field was populated as such Field1 + ',' + Field2 + ',' + Field3 + ',' + Field4 +…
Gregory Hart
  • 137
  • 1
  • 7
0
votes
1 answer

Printing a list of right justified separated numbers with no trailing space in python

for i in range(7): print("{0:>2}".format(i), sep = " ", end="") My sep = " " is not being taken into account. I do not want to use str.join(), and I would prefer to not have to create and add to a string each time the loop is run. Please help…
0
votes
1 answer

How to increase length of a text file by adding 4065009 spaces using Textpad or Notepad++?

I need to increase length of 2,00,000 rows by adding trailing spaces of around 4065009 using textpad or notepad++ . How is this possible ? I have tried various options available in Notepad++ like convert tab to space etc it isn't working .
Subha8
  • 9
  • 1
0
votes
1 answer

remove trailing spaces in a file only from non empty lines

I know how to remove all trailing spaces from a file, e.g : sed -i 's/ *$//' file Is there a way to do it, but not in lines containing only spaces? Something in the spirit of : sed -i 's/[a-zA-Z0-9;}{] *$/[a-zA-Z0-9;}{]/' file …
elad
  • 349
  • 2
  • 11
0
votes
2 answers

Cannot remove trailing characters

I have a MySQL query that is showing no results for 95% of the time. The query is very simple and is supposed to get the days of week that backups need to be takes for a specific node. I imported the data from a CSV into mysql I have found that when…
Martin Law
  • 444
  • 1
  • 3
  • 12
0
votes
1 answer

fastest way to make a new column holding the k-trailing min of another column

I have a python pandas DataFrame with very large columns. For one of the columns (call it column A), I need the fast possible way to make a new column (call it column E) or separate series. The elements of new column E are determined based on the…
A. Arpi
  • 217
  • 1
  • 2
  • 6
0
votes
1 answer

Silverlight TelerikGrid 'EndsWith' Filter is Not Working for values having Leading Spaces (Trailing Spaces)

I'm having problem binding the data to the grid when I filter using the operator EndsWith. fieldfilter.Filter1.Operator.ToString == "IsEqualTo" fieldFilter.Filter1.Value = fieldFilter1.Value.ToString().PadRight(120, ' '); In the database the values…
M.Sandeep
  • 11
  • 2
0
votes
1 answer

Git svn rebase: file out of date - trailing whitespace

I have an issue while using git svn. I have a repor which is used by people mostly from Windows but I use Linux. I have performed changes on this repo but today I got this after git svn dcommit: Could not chdir to home directory…
Patryk
  • 22,602
  • 44
  • 128
  • 244
0
votes
2 answers

Parse Number from string with regex

I have thousands of article descriptions containing numbers. they look like: ca.2760h3x1000.5DIN345x1500e34 the resulting numbers should be: 2760 1000.5 1500 h3 or 3 shall not be a result of the parsing, since h3 is a tolerance only same for…
tetter
  • 1
  • 1
  • 1
0
votes
1 answer

how to remove last zero from number in matlab

If I set a variable in Matlab, say var1 = 2.111, after running the script, Matlab returns var1 = 2.1110. I want Matlab to return the original number, with no trailing zero. Anyone know how to do this. Thanks in advance.
0
votes
0 answers

Symfony2, Trailing slash

i'm facing an issue i don't really know how to solve. I have this route: www.mysite.com/news/{news} On my local machine, i don't have a problem accessing it, but on the live-server a trailing slash gets added, and ofc the route doesn't exist =…
user2515948
0
votes
3 answers

return trailing set of nums from string python

How can I return the trailing set of numbers from a list of strings? mylist = ['kys_q1a2','kys_q3a20','kys_q2889b244','sonyps3_q92c288888'] expected result: [2, 20, 244, 288888] My failed attempt: for item in mylist: print…
Boosted_d16
  • 13,340
  • 35
  • 98
  • 158
0
votes
1 answer

Apache: RewriteRule removing trailing dot

Here is my .htaccess rules: RewriteEngine On RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^(.*)/(.*)$…
Jonathan
  • 4,724
  • 7
  • 45
  • 65