Questions tagged [text-manipulation]

Text/String manipulation is the term used to describe various operations applied to strings and/or text.

Text/String manipulation is the term used to describe various operations applied to strings and/or text. Often used with Regex or replace functions, concatination, etc.

237 questions
0
votes
3 answers

Subtracting an integer value from a text file and displaying the result in Python2.7

I have a text file which has something like 00:47:12: start interaction 00:47:18: End interaction 00:47:20: Start interaction 00:47:23: End interaction 00:47:25: Start interaction 00:47:28: End interaction 00:47:29: Start…
user89
  • 129
  • 1
  • 3
  • 11
0
votes
2 answers

Print uppercase/lowercase and reverse from input to output using a Thread

I'm trying to read each line from input.txt and print each line so each letter in the input line turns uppercase if it is lowercase, and turns lowercase if it is uppercase. Additionally, I'd like to use a Thread to do this, as I'd also like to…
Bob
  • 39
  • 1
  • 8
0
votes
1 answer

Insert List into HTML Autocomplete list via loop for Flask Website

I am trying to create a autocomplete function list to put into my webpage via Python and Jinja2(via Flask) Data: data_list=['router1 | location - tx | model A | xxserialxx | 10.0.0.1 | ', 'router2 | location - mo | model A | xxserialxx | 10.0.0.2…
BilliAm
  • 590
  • 2
  • 6
  • 26
0
votes
4 answers

Manipulate selected variable using AWK

I have an SQL file I am trying to manipulate using AWK. I have the following line which splits my SQL file on VALUES as I would like to handle the text before and after this field differently. The original file looks something like this: INSERT INTO…
RonnyKnoxville
  • 6,166
  • 10
  • 46
  • 75
0
votes
2 answers

Powershell convert list formatted record into table format

I'm looking for some powershell to convert Listed properties into a CSV or Table, not all records in the list have the same Properties but the "Index" property signifies a new record. INPUT Index:1 FirstName:Bob LastName:Smith DOB:1/1/1970 …
user3300840
  • 17
  • 1
  • 4
0
votes
2 answers

Rearranging the order of the text in a character string in SAS?

I have a data set with a character variable called "name". It contains the full name of a person like this: "firstname middlename lastname". I want to have the data rearranged so that is becomes: "lastname, firstname middlename". I'm not that…
user1626092
  • 499
  • 4
  • 11
  • 23
0
votes
1 answer

Text Manipulation Excel - How to swap two characters in a string?

How would you swap two characters in a string in Excel, with string and position to swap specified by the user? For example: User inputs a sentence: "Hi there!" User inputs an integer between 1 and half of the LEN(sentence): 2 Output: "He theri!" I…
Pells31
  • 5
  • 1
  • 2
0
votes
2 answers

Swap two parts of a filename or sentence separated by a -

I have a whole set of books in the format of A Knight dogs of the Word - Terry Brooks.epub or Enders Game - Orson Scott Card.epub and I want to swap them into the form Author's name - Book name.epub I looked on the site and found…
0
votes
2 answers

How to find relationship between two phrases?

How might I proceed to find relationship between two totally different but related phrases. For example: 1) "Social media websites of today..." 2) "Facebook is extremely popular social networking site..." While these two phrases does not really have…
oneCoderToRuleThemAll
  • 834
  • 2
  • 12
  • 33
0
votes
5 answers

VB to Delphi string manipulation code conversion

I have some VB source code and want to convert it to Delphi: Do While Not EOF(textfile) Line Input #textfile, Line Dim retstring() As String retstring = Split(Line, Chr(32)) first = retstring(0) second = retstring(1) I have some text…
paul
  • 327
  • 1
  • 7
  • 24
0
votes
1 answer

JYTHON 2.0 CODE -STRING MANIPULATION and replace

As i have already asked this question and i have later realized that tool for which iam writing JYTHON CODES supports presently on till 2.1 version as the intepreter is of 2.1 so some of the advanced technique is not working. Now being a…
kdev
  • 291
  • 1
  • 8
  • 21
0
votes
2 answers

Sed Command delete before first instance and after last

I'm looking for a sed command to clean up some kml files I have. The files are all on a single line and look like this Name Hotel 01 Hotel 02…
0
votes
2 answers

How to manipulate text with awk?

How would I be able to manipulate the output text of grep. Right now I am using the command: grep -i "" $file >> ./txtFiles/$file.txt This would output something like…
Tom D
  • 41
  • 2
  • 6
0
votes
2 answers

Perl script for combining 2 files with multiple entries

I have a tab-delimited text file like this: contig11 GO:100 other columns of data contig11 GO:289 other columns of data contig11 GO:113 other columns of data contig22 GO:388 other columns of data contig22 GO:101 other columns of data And another…
Amy Ellison
  • 89
  • 1
  • 7
0
votes
1 answer

Replace text with multiple unique values each time(AutoIt)

Is there any way to replace text that appears several times in a .txt file with a unique value each time? To be more specific: This is the given document: value="something" other text lines value="something" other text lines ... This is a…