Questions tagged [substitution]

The action of replacing something with another thing.

The action of replacing something with another thing.

1879 questions
0
votes
1 answer

Is there a way to parse inline literals?

My project uses a substitution quite a bit (.. |apipath| replace:: http://domain/api/v1), and I'd like to be able to use this substitution inside an inline literal block. I want something like the following rST source: Request URL:…
Spencer Williams
  • 902
  • 8
  • 26
0
votes
3 answers

How to execute a string substitution on multiple files?

I have dozens of bash scripts in a certain location (/subdirectory1) with the incorrect pathname (pathname1) within the file. I would like to somehow replace this pathname with pathname2 for all of the bash scripts *.sh within that subdirectory. Is…
ShanZhengYang
  • 16,511
  • 49
  • 132
  • 234
0
votes
2 answers

How to match and substitute within pattern in VIM - How to match and substitute text within two characters VIM

I have the following text: ," abc def , qwerty ghans , ghjt bnsn 5667w !*? ", I want to match and substitute the commas in between ," AND ", for another character (or better yet, remove them).
FG74
  • 61
  • 1
  • 6
0
votes
1 answer

How to update the value of a field in a column with value from another field only in specific conditions (context)?

I have file where I want to update the values in the first field of a specific column (say 1 and 2) when there is a context (pipe i.e |) in the 5th field of that column. I can use python but splitting the lines, substituting the values and joining…
everestial007
  • 6,665
  • 7
  • 32
  • 72
0
votes
1 answer

linux bash build command with strings from csv

I am pretty new to bash (and linux overall). Been researching the whole day thinking this was a simple fix that I was not understanding but I've tried a thousand different things and still cannot make it work... need an extra pair of eyes and some…
QCIHDTM
  • 43
  • 6
0
votes
0 answers

How to write ASCII 026 char on iPhone

I have a customer on a webshop, who has managed to write her last name as 195 131 026 082 110 116 111 102 116 013 010 (ÃRntoft), which is breaking stuff. The character 026 ("Substitute"), is my problem. How is it possible to produce this character…
Mazuren
  • 1
  • 1
0
votes
3 answers

VB - Substitution of letters

so I am making a decryption software that allows the user to input some text and then they can swap out letters in the program. For example, there is a drop down box that allows you to swap all the "O"'s in a user input to "W". So in the input…
Lauren
  • 77
  • 7
0
votes
3 answers

C Substitution Cipher

I'm creating a substitution cipher in c, reading characters from a text file and encrypting them. However, when I run the program, the text in the file is not encrypted. I'm not sure, however, what exactly I'm missing. Any and all help is…
Alaska
  • 11
  • 1
  • 4
0
votes
1 answer

Groovy String replacement with link

I have multi-lines string from git log in variable and want to replace matched lines with hyper-links but keep some parts of the original string with Groovy. Example: commit 7a1825abc69f1b40fd8eb3b501813f21e09bfb54 Author: Filip Stefanov Date: …
Filip Stefanov
  • 800
  • 3
  • 10
  • 18
0
votes
2 answers

Perl regular expression variables and matched pattern substitution

Can anyone explain regular expression text substitutions when the regular expression is held in a variable? I'm trying to process some text, Clearcase config specs actually, and substitute text as I go. The rules for the substitution are held in…
0xDEADBEEF
  • 808
  • 1
  • 11
  • 19
0
votes
3 answers

Execute module-qualified function inside perl regex substitution?

I have the following perl one-liner to convert /path/to/file.txt to /path/to/ echo "/path/to/file.txt" | perl -pe 's{(.*)}{File::Basename->dirname($1)}ge' but I'm missing something in my invocation of File::Basename->dirname(), causing the…
Sridhar Sarnobat
  • 25,183
  • 12
  • 93
  • 106
0
votes
1 answer

Python Sphinx Substitutions not throwing errors or warnings like ref's

In an effort to make the .rst files more readable I started using substitutions instead of refs everywhere for common objects. For example :ref:user-story is now |user story|. The output is fine, but when a user mistypes a substitution we do not…
Eric Rohlfs
  • 1,811
  • 2
  • 19
  • 29
0
votes
1 answer

Remove text from Cell if specific words show in another coumn

I'm hoping this will be a simple one but it's stumped me this morning. I have a spreadsheet which in column A has verbatim from customers. In each cell of column A there could be more than one word. What I want is to filter Column A and its rows so…
0
votes
1 answer

How to encode Permutation of Substitution

I want to substitute from cypher text to plain text. But there can be n! possibilities where n is the number of characters for example cypher: [ a, b, c, d ] plain : [ x, y, z, m ] Let's say that I am sure one of the combination is correct plain…
eneski
  • 1,575
  • 17
  • 40
0
votes
1 answer

Substitution method to prove recursion running time

I am working on these three recursion funtion to prove a big-O. I tried to use substitution method. But, I have no clue to guess a proper upper bound. (a) T(n) = T(n − 2q − 1) + T(3q/2) + T(q/2) + Θ(1) (b) T(n) = T(n − q − 1) + T(n/2 − q) + Θ(n) (c)…
1 2 3
99
100