Skip to main content

All Questions

1 vote
1 answer
768 views

How to combine files of similar file names together in python?

Imagine I have a folder with the following items : default.xml df_ak01.1001.jpg df_ak01.1002.jpg df_ak01.1003.jpg df_ak01.1005.jpg df_ak01.1006.jpg (Here we can see that df_ak01.1004.jpg ...
Nirmal Kumar's user avatar
1 vote
1 answer
1k views

golang format data to JSON format in one pass

My original data format: id=1, name=peter, age=12 I converted it to JSON string: {"id" : "1", "name" : "peter", "age" : "12"} I use the following golang statement to do the conversion: Regex, err = ...
user7926440's user avatar
0 votes
2 answers
2k views

How to split/parse a Java String to display cleanly with bullet points?

I have data being populated into a String with example data : Include: 1. lorem ipsum 2. blah blah 3. test test Exlude: 1. the quick brown 2.fox 3. jumps over Right now we are displaying the ...
Javed Ahamed's user avatar
  • 2,944
0 votes
1 answer
266 views

RegEx to add commas and Single quotes

Thanks in advance for your help... I have a panel of information in the following format: ACMH ADMIT TO XXX ACSU ADMIT TO XXX SUB-ACUTE (TCU) ADOPT ADOPTION ...
Dylan Haines's user avatar
4 votes
2 answers
3k views

read tab delimited file in clojure

How do I read a tab-delimited file using Clojure? There may be whitespaces in a line which do not correspond to a tab. E.g.: transform some field another-field a third field into ["some ...
animalcroc's user avatar
0 votes
2 answers
94 views

String formatting prob for making database value inside a file

I have a bean class which does maintain user data: soppose I have created a postgresql DB table like this: StringBuffer sqlStr = new StringBuffer(); sqlStr.append("CREATE TABLE Users (" ...
Mehdi's user avatar
  • 3,783
0 votes
2 answers
2k views

JAVA SimpleFormatter, is impossible to set the regex

I am adding a logger to my program, surfing the net I add to my code a very simple logger with the basic 2-line definition: private static final Logger LOG = Logger.getLogger(GUI.class.getName()); ...
Gianmarco's user avatar
  • 2,552
0 votes
4 answers
210 views

Formatting text file

I have a txt file that I would like to alter so I will be able to place the data into columns see example below. The reason behind this is so I can import this data into a database / array and ...
Rick T's user avatar
  • 3,409
235 votes
3 answers
244k views

php Replacing multiple spaces with a single space [duplicate]

I'm trying to replace multiple spaces with a single space. When I use ereg_replace, I get an error about it being deprecated. ereg_replace("[ \t\n\r]+", " ", $string); Is there an identical ...
Dani's user avatar
  • 2,353