Questions tagged [string]

A string is a sequence of zero or more characters. It is commonly used to represent text or a sequence of bytes. Use this tag along with the appropriate programming language being used.

Filter by
Sorted by
Tagged with
0 votes
1 answer
47 views

remove duplicate character from string in pure bash - works in CLI but does not work in script

I want to remove all duplicate minuses from a string using pure bash (no sed/awk/etc). This works great in CLI: s="com---strig-3-1080p-----mp4" echo "${s//+(-)/-}" com-strig-3-...
Putnik's user avatar
  • 924
0 votes
1 answer
84 views

How do I Iterate over an array of spaced string pairs in zsh?

I was reading the post here and tried out the solutions. However, the following does not produce any output. What am I missing? arr=( '102 351' '576 324' '427 321' ) for str in "$arr[@]"; ...
kesarling He-Him's user avatar
1 vote
2 answers
498 views

Search directory of multiple files for string of data

I need to search a bunch of files for a particular string of data that I have stored in HEX format. For example, I have over 200 files, one of which contains: 60 55 8B EC 83 EC 48 56 57 83 CF FF How ...
Kalamalka Kid's user avatar
0 votes
0 answers
91 views

How to write a macro that iterates an array of strings and displays one of them at any given time in LibreOffice Impress?

I teach Spelling at an elementary school. To make class more entertaining, I decided to add interactive content. In this example, students are given a presentation. The picture in the slide is an ...
zz763's user avatar
  • 1
0 votes
0 answers
52 views

How do you mix string literals with format operators on tmux?

I know I can use some Format operators such as #{=-2:my_format} It will be a negative trimming of 2 , on my_format , such as say my_format = prefix :display -p "#{=-2:prefix}" It will ...
freddie_ventura's user avatar
1 vote
1 answer
2k views

Finding the first Non-Numeric Character in a String but not excluding decimal denominators

Building off of this resolved question: Finding the first Non-Numeric Character in a String In that question, the OP requested help on an excel formula which would return the position of the first non-...
Dries Vermeulen's user avatar
0 votes
1 answer
396 views

Word wildcard find & replace puts strings \1 and \2 out of sequence

In Word, I want to replace the colons between numbers with "p." to indicate a page number. This is similar to one of most common uses of this feature, to replace hyphens with en dashes (like ...
Erik Marsh's user avatar
0 votes
1 answer
539 views

Powershell: Use a string as multiple args

I have a string variable in PowerShell, $t="foo bar" and it should be passed as argument to command 'start-process'. My 'start-process' needs multiple args which is "foo" and "...
Dan D.'s user avatar
  • 701
0 votes
0 answers
73 views

How can one view the entire string of a JSON file in HugeJsonViewer?

I use HugeJsonViewer to browse the JSON file. How can one view the entire string of a JSON file in HugeJsonViewer? I can only see the beginning:
Franck Dernoncourt's user avatar
0 votes
0 answers
522 views

How do I detect nul (0x00) characters in a vim string or register?

I have a vim register that contains a string. I need to step through each character in the string, and process each one individually. My problem is that given a character pulled from the string, I am ...
Rich88's user avatar
  • 1
0 votes
2 answers
396 views

vba TRUE or FALSE text from Clipboard recognised as boolean by Excel

I have table with one of the column (let say column Code) has text TRUE in it. But, when I copy it to excel, the data become boolen so my vlookup (that search text TRUE from column code) become an ...
Loki Sinaw's user avatar
0 votes
1 answer
264 views

Excel - get (extract) all names of the cities from the range

I have situations such as this: where between the bunch of addresses reaching the 3000th row I have the name of the town from time to time. In order to avoid scrolling thru this whole list and ...
Geographos's user avatar
0 votes
1 answer
562 views

Checking for string match in bash script command line arguments

I'm clearly missing something basic and would love some enlightenment. I've seen numerous posts about seeing if your bash command line arguments match a string. However, I can't get things to work ...
mikemtnbikes's user avatar
0 votes
0 answers
53 views

How to fill a column getting a substring of another one with a rule

I'm trying to play with the functions LEFT, RIGHT and SEARCH to fill a column with the name of a function extracted from another column, but I don't get any good result. I have a list of functions ...
Víctor Martín's user avatar
0 votes
3 answers
8k views

How to extract a particular part from a string in bash

There is this output i get: Duration: 00:03:27.05, start: 0.000000, bitrate: 336 kb/s I want to extract 00:03:27.05 from this whole string(Values Can Change). So far I have tried: String="...
Random Guy's user avatar
0 votes
1 answer
1k views

How to use wildcard in 'win_stat' module in Ansible?

I created below Ansible script where I check if a directory is present or not with wildcard but it failed for me: - host: windows vars: dir: 'c:\inetpub\wwwroot\mysite*' # without * playbook ...
Nullpointer's user avatar
0 votes
1 answer
126 views

Combine cells value with the header and ignore the blanks

I want to combine the fixed row value with diffrent column value but by skipping blank cells. I've a code but it is not working. Please suggest Public Function SuperJoin(r1 As Range, r2 As Range, ...
neelabh's user avatar
1 vote
0 answers
45 views

If a ligature/digraph has separate collation order, should it be considered different from constituent letters?

There are many digraphs and ligatures in common use like ß, w, ffi, st, æ, dž, ch etc. Some of these are completely different from its constituents. For eg, search for u in a string containing w should ...
Sourav Kannantha B's user avatar
1 vote
1 answer
2k views

How to find a character in a string using Powershell?

Using Contains to find a value using PowerShell is not working. Full Story: I have to get the PartNo, Ver, and Rev values from an SQL DB, and check if these values occur in the first line of the text ...
Brute's user avatar
  • 23
1 vote
1 answer
951 views

Extract/Replace and Convert string in Notepad++

i have a file looking like this: Line 207: ["Mystic Scroll: Shock and Swarm"] = { Line 297: ["Mystic Scroll: Concentrated Solar Beam"] = { Line 474: ["Mystic ...
Derind's user avatar
  • 13
-3 votes
1 answer
146 views

Turning a string of text into individual rows [closed]

I have a series of letters in Excel I would like to turn into individual rows. Is there a simple command to do this instead of using text to column and separating through each one. The list is as ...
wobble's user avatar
  • 1
0 votes
1 answer
320 views

Using Notepad++ i am trying to change a string of numbers and letters like a MAC address to have the Semicolons in between every two characters [closed]

Using Notepad++ I am trying to change a string of numbers and letters like a MAC address to have a Semicolon in between every two characters and then a Comma between each MAC address and put them all ...
Patrick's user avatar
5 votes
1 answer
3k views

ZSH iterate through string array containing spaces

I am trying to write a ZSH script which will iterate through a series of strings that contain spaces. First, I'll set -A the array: set -A a "this is" "a test" "of the" &...
Benjamin Dennison's user avatar
0 votes
1 answer
2k views

Extract string after a delimiter like "/ " OpenOffice Calc

I have a file that converts inputs for me into an SKU-number (Stock Keeping Unit). The names and attributes I have are in one line and one cell like so: Temperature Displaying Smart Ring / Rose Gold – ...
itsolidude's user avatar
0 votes
1 answer
89 views

How to increment group numbers in a settings file?

I have an application with a settings file (.ini) that contains data in the common format: [group1] foo=bar bar=baz ... [group2] foo=bar bar=baz ... ... [group500] foo=bar bar=baz ... where the ...
End Anti-Semitic Hate's user avatar
-2 votes
1 answer
130 views

Extract string and save each in txt

I have a file text with inside : line1 name1 line2 name2 How can I extract as this? Extract & copy line1 to a new file saved as name1 Extract & copy line2 to a new file saved as name2 I used ...
Iztac's user avatar
  • 1
1 vote
2 answers
618 views

Formula to extract value before specific text and after comma or beginning of original cell

I'm trying to extract statistics from a single cell 65 Rush Yds, 1 Rush TD, 1 Fum Lost, 105 Rec Yds, 1 Rec TD to individual columns Rush Yds: 65 Rush TD: 1 Fum Lost: 1 Rec Yds: 105 Rec TD 1 Extracting ...
user1320850's user avatar
0 votes
1 answer
950 views

How do i pass function parameter as string in fish shell

Octave has an --eval option that takes a sting like "sqrt(4)" and outputs "ans = 2". I want to create a function that passes the a parameter as string so i can call it like this: ...
Paul Schuldesz's user avatar
1 vote
1 answer
673 views

Conditional Formatting - Looking for cells not including two particular characters followed by two numbers

Using Excel 2013 I'm looking to apply a conditional formatting rule to all cells in a range of a column that do not contain SD followed by two numbers, so an example would be SD01 or SD32. The column ...
BradR's user avatar
  • 672
0 votes
0 answers
126 views

Excel: convert IMAGE cell to txt cell?

I download an excel file from web. In this DB file I have photo linked to some records but in the file each photo is linked in an IMAGE cell. I would like to insert the name of the photo instead IMAGE....
Ale's user avatar
  • 756
0 votes
1 answer
326 views

Excel: Extract a project number from a text string (various position and length)

In an Excel spreadsheet I have a column of mixed text strings containing project master data (type, project no., address, theme and such). From this string I need to extract the project number in an ...
aliaz's user avatar
  • 3
1 vote
1 answer
127 views

How to prevent Safari from implicitly converting character in XHR request?

I picked this character 〉 as a separator for my combo-key-field for my DynamoDb database. That character surfaces in the browser as part of a next-page-query token. (in an endless scroll list view) ...
Birowsky's user avatar
  • 113
0 votes
1 answer
7k views

How do I include double quotation mark in a concatenated string in Excel

I have been unable to find a resource that shows how to add double quotation marks to a concatenated excel string. For example if I would like to represent 72 inches as 72" in a string the added ...
A.K.'s user avatar
  • 121
0 votes
1 answer
914 views

I keep finding the same string in memory dumps

First off, forgive me - this is less a problem and more of a personal curiosity, but hopefully it will pique the curiosity of my fellow enthusiasts here! As a geek, I do love to get into the processes ...
Cryogen's user avatar
  • 103
0 votes
1 answer
514 views

Find number of files that contain certain String

I have a directory containing a vast amount of xml files. I would now like to find the number of files (and optionally the names of said files) that contain a certain string. XML tags do not really ...
T A's user avatar
  • 103
0 votes
1 answer
34 views

Is there a way to break lines that match a string pattern, but only if that pattern falls between matching strings?

I’m using the code below to break lines that match a pattern: Find what: ([0-9]) ([A-Z]) Replace with: \1\n\2 so that … Super Bowl 3,1:56.2 Armbro Goal 3,1:54.3 … becomes Super Bowl 3,1:56.2 ...
mapman's user avatar
  • 93
1 vote
1 answer
2k views

How do I combine lines of text in Notepad++ that are between string lines into one line of code, while retaining lines outside the string delimiters?

I have 100s of pages in text format in Notepad++ that came from a pdf file. Each page in the file has varying amounts of lines, but they all contain lines that read “TARGET_LINE,” and "...
mapman's user avatar
  • 93
1 vote
1 answer
798 views

How do I combine varying multiple lines of text in Notepad++ into one line of code with a common beginning and ending string?

I have 1000s of lines of text in Notepad++ with multiple instances of lines beginning with “FIRST_LINE,” followed by varying numbers of lines, and ending with a line called "LAST_LINE,". ...
mapman's user avatar
  • 93
2 votes
2 answers
132 views

How can I create a new line break at the first letter following a dash?

I’ve been using this wonderful site for years, but after hours of searching in it, I cannot figure out how to do the following in Notepad++. So I opened an account to respectfully make the following ...
mapman's user avatar
  • 93
0 votes
1 answer
1k views

Excel 2016: how to find all superstring matches in a column of cells from another column?

I have two columns of strings in Excel 2016. Column A is long. Column B is short. I need to: Loop over all cells in col B For each cell, I need to find all cells in col A where the string from B is a ...
I Z's user avatar
  • 489
0 votes
0 answers
70 views

What is the find and replace "s/{pattern}/{string}" format called?

s/{pattern}/{string} keeps coming up in find and replace contexts (vim, sed). Is this a standard way of presenting find and replace strings? Does it have a name? Is there a standard somewhere for this ...
jrpear's user avatar
  • 120
2 votes
1 answer
3k views

FINDSTR Multiple Search Strings [duplicate]

Looking for either word “ And ” or “ In ” with preceding and ending spaces, I can using following FINDSTR command: findstr /r /c:” And ” /c:” In “ textfile Is there a way to do similar search with ...
Sui's user avatar
  • 21
0 votes
0 answers
120 views

How to stop Excel from saving .txt files with strings converted to "#########..."?

I need to save an Excel file as a tab-separated .txt file for compatibility with other software. However when I do this, the long strings of text that appear as strings of hash symbols in the UI but ...
Mel's user avatar
  • 537
0 votes
1 answer
530 views

windows batch compare then skip utf  in first line of file

I would like list lines of file in batch and, in case of UTF file, skip "" characters in first line. @echo off setlocal EnableExtensions EnableDelayedExpansion for /f "delims=" %%a in (list.txt) ...
user1855805's user avatar
0 votes
2 answers
2k views

Powershell: evaluate math expression represented as string

In PowerShell, how do I evaluate a mathematical expression stored as a string? How do I get PowerShell to evaluate the following: C:\> $a="30000/1001" C:\> $a 30000/1000 C:\> Desired ...
Brian's user avatar
  • 1,007
1 vote
1 answer
225 views

Applying -lt on string variables in bash

I am new to bash scripting. I have to compare two values here, $i and $cdsStart: check if $i is lesser than $cdsScript, below is my code for doing the same. inputFile="$1" while read -r ...
User's user avatar
  • 111
4 votes
1 answer
22k views

Excel: Function which gives location of a cell containing specific text

I've had a look around on google but have only been able to find formulae for checking whether or not a cell contains a given piece of text, however what I'm looking for is slightly different. I ...
Tom's user avatar
  • 43
0 votes
1 answer
139 views

How to split the not regularly whitespace fields using awk or like others?

I want to split the data as below: $1 $2 $3 $4 $5 $6 $7 $8 ......... -------------------------------------------------------------------------------------------...
Namhyeon Go's user avatar
0 votes
1 answer
91 views

String manipulation - get part after a certain word

Background: Although I think Fail2Ban is great way of securing subsystems like Apache, it takes a lot of work to get all the info together. So I'm writing a BASH script to do that for me. I need to ...
Supr0's user avatar
  • 7
0 votes
1 answer
93 views

Excel 2013 - How to remove numbers only from different positions and preceded by different symbols, letters

Is there any formula on Excel 2013 that can be used to remove digits from rows? I want to leave only letters and symbols. The formula needs to work for numbers that can occur at any position, ...
Geo_explorer's user avatar

1
2 3 4 5