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.

learn more… | top users | synonyms

1
vote
3answers
3k views

Microsoft SQL. SELECT FROM WHERE query with varchar type column

Inside the SQL Server Management Studio I am trying a query like this: In human words: Give me all rows from the table where the string in the column "name" is "alice". My not working attempt on ...
0
votes
0answers
14 views

Java Program to split the array based on marks [migrated]

Create class Student with below attributes: rollNo Name Marks Create class StudentDemo with main method. Declare array of 5 student objects in main method. Initialize this array. Declare another ...
0
votes
0answers
32 views

MS Word Macro to change string to Numbers in long documents?

I am as beginner as it gets with VBA and macro. I am looking to record a macro for MS Word documents that converts string to number. For example the document will have like (one thousand and four) or (...
2
votes
3answers
37 views

How do I search for substrings in Bash?

I want to find out and display the total amount of TTT substrings found in the first 2,000 lines in the file. I had been using grep until I tested it, and realized it does not identify substrings.
0
votes
1answer
4k views

How do I populate a column with the first x characters of text data in another column

I have a column with 14 characters. There is real information based on the first three characters. I want to have another column with only the first three characters for visibility and group by ...
1
vote
2answers
78 views

How to split a string with quotes (like command arguments) in bash?

I have a string like this: "aString that may haveSpaces IN IT" bar foo "bamboo" "bam boo" I want to be able to split it like this: aString that may haveSpaces IN IT bar foo bamboo bam boo ...
1
vote
3answers
54 views

Find first string in text string that is numbers only. Formulas only

Is it possible to find the first string within a string that contains only numbers/digits? I have a few thousand addresses to process and some of them have Apartment numbers. I need to find the ...
0
votes
1answer
46 views

Powershell redirect to variable value containing colon

Is there a way to use a variable whose value contains the colon character as a filename string in a command-line redirect? Powershell always treats the colon as a drive separator, regardless of escape ...
1
vote
1answer
42 views

Concatenate strings

I would like to concatenate two columns of strings into one string in a separate column as follows. A B C CIK: 007924 CIK:007924 CIK: 009732 CIK:009732 but what ...
4
votes
2answers
966 views

concatenate cmd line starting from some parameter

If I get a cmd line like: myscript param1 param2 param3 param4 param5 param6 ... (so on) How can I save a string consisting of parameters starting from some specific one? The $@ gives me the whole ...
0
votes
1answer
33 views

How to get the difference between 2 cells

I have an Excel file like below. The value in column C should be the difference between A and B (A is always longer, B is always A substring). If both values in A and B are same, C will be empty. ...
0
votes
0answers
23 views

How to extract Shift-JIS strings from binary in Windows 8?

How can I extract Shift-JIS strings from a binary file in Windows 8? I'm looking for actual words in a binary file. So not just meaningless combinations of characters. Other Japanese character ...
3
votes
2answers
55 views

How can I how extract/parse variable info from the END of a string in Excel?

Example1: 01/28/14 Interest Earned 0.10 Example2: 12/27/13 CHECKCARD 1226 LIONHEART BOOKSTORE SEATTLE WA -25.13 In the two examples provided, my goal is to separate out the information ...
1
vote
1answer
150 views

R: subset lines of a dataframe containing a string in another file

I would like to subset the lines of data frame 1 (df1) that contain a string from a column in data frame 2 (df2). The problem is that file1 will have multiple strings in the same column. I have tried ...
10
votes
5answers
16k views

Excel CSV import treating quoted strings of numbers as numeric values, not strings

I've got a web application that is exporting its data to a CSV file. Here's one example row of the CSV file in question: 28,"65154",02/21/2013 00:00,"false","0316295","8316012,8315844","MALE" ...
0
votes
1answer
80 views

How to write “!” symbol between double quotes in bash? [duplicate]

I can't figure out how to write ! symbol in bash scripts when putting it in double quotes strings. For example: var="hello! my name is $name! bye!" Something crazy happens if I type the following ...
0
votes
1answer
128 views

How do I remove the (Default) REG_SZ?

How do I remove the (Default) REG_SZ from a key and replace it with a REG_EXPAND_SZ value with the same name? The REG_SZ type doesn't suit my purposes, but the command expects the 1st (or only value ...
0
votes
0answers
15 views

Any number of arguments when looping through array of strings?

I'm currently working on making a basic linux script such that it takes any number of arguments and calls a separate script to print the third character of each argument on separate lines. I made ...
0
votes
1answer
154 views

Regular expression for find in files in Textpad

I want to use regular expression for find in files in TextPad. I need to find URLs starting with "Areas/" and ending with "/pdf"(something like this Areas/../../...pdf). Please suggest me the correct ...
0
votes
0answers
15 views

Char case variations tool

I am looking for a tool that will create a dictionary with every possible variation of upper and lower cases chars of a phrase. Example: cat Cat CAt CAT cAT caT cAt
0
votes
3answers
395 views

Split folder paths in Excel to return the final folder

I have a single column in Excel which has a file and folder path. e.g. C:\1_Folder\2_Folder\3_Folder\my_file.txt I would like to extract the name of the final folder and place this in a new column. ...
0
votes
1answer
2k views

awk - awk concatenate string variable

I would like to awk concatenate string variable in awk. How can I do that? I tried: BEGIN{ t="." r=";" w=t+r print w} But I does't work. Output: 0 Or I want to add variable and result of ...
0
votes
2answers
45 views

Click Every Word that ends with “.log.gz” in Any Language Compatible with Google Chrome

I have looked up the answer to this already and cannot do this with the programming languages I know, so I'd like the code for this and an explanation as to how it works so I can use this in future ...
2
votes
2answers
128 views

String replacement in Windows batch

I am trying to understand how string replacement in Windows batches actually works and having trouble. @echo off set var=wild set varnew=%var:l=n% echo var is: %var% echo varnew is: %varnew% does ...
1
vote
2answers
680 views

How to search for any files that do not contain a proper XML root element?

I need to be able to search several thousand XHTML and XML files and see a list of files that do not contain the following string on the first line: <?xml version="1.0" encoding="utf-8"?> How ...
1
vote
1answer
44 views

xrandr | grep “ connected ” give me more than one line but IFS=$'\n' read can't break it

I have something like this: declare -a DISPLAYS AUXILIAR="$(xrandr | grep " connected ")" IFS=$'\n' read -ra DISPLAYS <<< "$AUXILIAR" Why it isn't detecting line breaks if echo "$...
1
vote
1answer
192 views

How to Concatenate Repeating String in Batch Script

I'm trying to concatenate a repeating string depending on the first parameter value passed into the script when it is called. This value represents the number of directory levels the current ...
1
vote
2answers
76 views

How could I search a text file in Win7 and make it display matching lines

I have a large list of names that I have to search through many times a day. Using "find" in Notepad has gotten me by, but is there a way in the command line to display the matching strings by line ...
2
votes
1answer
77 views

Notepad++ - Delete Everything Other Than The Specified Strings

I have the following strings that I want to keep and delete the rests: uicomp-type="example-string" uicomp-type='string-example' I use the following regex to find those strings: uicomp-type="(.*?)"|...
0
votes
1answer
63 views

PowerShell - Quasi equivalent strings are infact not equivalent?

I have a string which I'm passing into my script as an argument. For the purpose of displaying the code on here however, I have specified these manually in the code. These variables are: $...
0
votes
1answer
31 views

Generate string from table cells

I am using Excel 2008 for Mac. I would like to have a cell generate a string based on the contents of the other cells on the same row. For example, say I have the following table headers: bob, weave,...
2
votes
3answers
1k views

Parse string using batch script

How can I parse string using batch script? Goal is to save in a array everything under Import: and strip out #head for example --> //MPackages/Project/config/abc.txt and //Packages/Project/config/cde....
15
votes
4answers
13k views

How do you escape apostrophe in single quoted string in bash?

I don't understand how bash evaluates escaping of apostrophe characters in single quoted strings. Here is an example: $ echo ''\''Hello World'\''' 'Hello World' # works $ echo '\'Hello World\'' &...
0
votes
1answer
155 views

search and replace string using batch or perl script

How can i search for "//packages/thirdparty/release/main.txt #10" and replace #10 with #15(set VARIABLE="#15") using batch commands and also ignoring spaces. #10 can be anything, lets assume #XXX. ...
0
votes
1answer
69 views

MS Excel - Unique name within the same column

This may be an already asked question, but unable to locate a solution that is suiting my needs... I have an Excel sheet of >24K entries. The Problem I have is the entries in a particular column are ...
0
votes
1answer
96 views

Worksheet function to check if cell contains only characters as defined in a constant string

I have this string constant: abcdefghijklmnpqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890' - Now for each cell in column A I want to check, in column B, with a worksheet function, not a Macro, if ...
0
votes
1answer
43 views

Replace a couple of strings of text automatically?

More detailed: I've got a folder with data for a game which code is pure text and customizable (M.U.G.E.N). Beside all other things, the *.cns file of each character contains following string of text:...
1
vote
1answer
314 views

Notepad++ macro for changing a certain part of a string

I want to define a Notepad++ macro that takes any string that contains "foo", and creates its new versions only changing the foo to "bar1", "bar2" etc. so if my file contains abc_foo_def when I ...
-1
votes
1answer
371 views

String command in netbeans does not color blue as commmand

I have a windows vista home premium on my toshibe Lap, and i use netbeans. The problem is when i type in netbeans the command "String" it does not color it bluei (that means that this is a command), ...
1
vote
1answer
46 views

calc: Extract string from range of cells

I´m trying to figure out a easy to understand way to extract a string (that is in a range of cells) from a range of cells... That is the range of cells I have to look for a specific string (in a ...
-2
votes
1answer
301 views

PowerShell: find line but include proceeding and preceding line(s)

This is a conceptual question that I have only briefly thought through my head. I have idea how I might do it but it seems more complicated than I think I will make it out to be. A common need is for ...
0
votes
0answers
39 views

Strings.exe does not see Cyrillic

Sysinternals utility Strings.exe does not see Cyrillic strings despite the fact that it works with Unicode. Does exist any utilities or libraries that really can extract all printable Unicode strings ...
1
vote
1answer
165 views

Iptables: Filtering string encrypted by ssl

I need to filter (send to BANRULES set) incoming http/https packets with a certain string (matchword). I do it easy when ssl is not in use (port 80): iptables -A INPUT -p tcp -m tcp --dport 80 -m ...
28
votes
5answers
62k views

Formatting a comma-delimited CSV to force Excel to interpret value as a string

Searching around for a while trying to figure out how to format a CSV file in such a way to force Excel to interpret the values as a string and not try and convert them to numbers or dates. e.g... "...
1
vote
1answer
138 views

How To Search for multiple multi-word strings in vim?

For example I'm trying to search for the occurence of both hello world and goodbye world in the same line. I've tried a bunch of difference iterations. For example, if you want to find one multi-word ...
0
votes
2answers
421 views

How To Extract Pattern from a folder path (VBA Excel)

I'm pretty new to vba excel and trying to reorganise a very large file structure. Basically, all our equipment has a tag in the form of [A-Z][0-9]0-9][0-9][A-Z] e.g. J452G being a compressor. Every ...
2
votes
1answer
656 views

Excel VBA - User Defined Function to turn string into formula

I'm looking for something similar to the solution posted here: Excel function that evaluates a string as if it were a formula? Problem is this does not seem to work with a function in there. This ...
4
votes
1answer
26k views

Can I force an Excel 2010 Pivot-Table to display text strings from my raw data?

Here is my use-case. As a training specialist I want to look at a single tab in Excel and see student feedback at a glance. I want to see pie-charts showing who said "Yes" this course was a good use ...
6
votes
5answers
21k views

Excel Cell Length Limit

Excel is refusing to open some of the files I programmaticaly create. I think what is happening is that it pukes because a particular column has very long strings (up to 1850 chars), but for the ...
3
votes
2answers
434 views

sed in bash not working

I am trying to use the stream editor sed in bash to replace a string in a file to a new string that I entered, I have this thus far: echo "name to change" read updatenaamold echo "enter new name:" ...