import re
stringWithNumbers='anystring2with 6.89 numbers3.55 3.141312'
digits = re.findall("[-+]?\d+\.?\d*", stringWithNumbers)
Python programming, with examples in hydraulic engineering and in hydrology.
Showing posts with label String. Show all posts
Showing posts with label String. Show all posts
Tuesday, July 24, 2018
Monday, December 14, 2015
Text string to Excel
Sometimes we just want to handle some data, from or to excel.
Here is a tip that can help in your scripts, when you want to copy data from or to an Excel spreadsheet.
Microsoft Excel recognizes the tabulation character ('\t') as cell separation, and a line break character ('\n') as a normal line break.
For example, if you copy some string data to the clipboard, as explained in previous post, you can paste it to excel cells, if the data is separated by '\t' character.
Here is a tip that can help in your scripts, when you want to copy data from or to an Excel spreadsheet.
Microsoft Excel recognizes the tabulation character ('\t') as cell separation, and a line break character ('\n') as a normal line break.
For example, if you copy some string data to the clipboard, as explained in previous post, you can paste it to excel cells, if the data is separated by '\t' character.
Subscribe to:
Posts (Atom)