Questions tagged [wildcard]

A wildcard character is a specially defined character allowing for substitution of any other character, including a pattern or sequence of characters. Use this tag for questions on how to use wildcards for regular expressions, shell scripting, string manipulation and database control, but not for use in terminal commands as that is off-topic.

A wildcard character is a special character defined by many different systems/programming languages with each their own specific implementations. They may allow for accessing single characters, sets of characters or all characters matching a certain regex pattern.

Examples include :

* - Any sequence of characters. (DOS/Unix)
? - Any single character. (DOS/Unix)
% - Zero or more characters. (SQL)
# - Matches a single numeral. (SQL)
. - Matches a single character. (Regular Expressions)

4611 questions
1
vote
0 answers

Powershell command Start-BitsTransfer fails when source file paths contain square brackets []

EDIT: I'll leave the question here as the help docs don't mention wildcard escaping, but using [WildcardPattern]::Escape('C:\temp\file[file].txt') works. On Windows (10) it's valid for file paths to contain square brackets…
Geordie
  • 1,920
  • 2
  • 24
  • 34
1
vote
0 answers

Difference between Java widlcards and generics

what is the difference between these 2 method signatures? public void fromArrayToList(List a) { } public void fromArrayToList(List a) { } One is taking a List, and the other is taking a List. I am able to pass a list…
1
vote
2 answers

Using generics with custom object in method parameters

I have 2 classes as below :: ItemA { // varibales and methods. } ItemB{ // varibales and methods. } And I have a method in a service class : public Map getItemDetails(Map itemMap, String itemType){ …
Som
  • 1,522
  • 1
  • 15
  • 48
1
vote
1 answer

Word Wildcard search being dumb

So I have a program that is trying to find and run macros based on if the document contains macro:MacroName. I want the "macro" bit to be case insensitive (incase some numpty decides MaCrO is perfectly acceptable). Problem is that I can make 4 out…
1
vote
2 answers

Vim replacement with wildcard and special characters

Is it possible to perform wildcard replacement on string that contains lots of special characters? String to search for: Replace with: I basically want to get rid of all the abc123 in whole…
Jotter
  • 91
  • 9
1
vote
1 answer

Wildcards in SQL doesn't return the expected output

I tried to run a SQL script in MySQL DB as below SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME LIKE 'ACT_%' OR TABLE_NAME LIKE 'IMS_PPH%'; In the response it is showing 'actor' and 'actor_info' table names even though I filtered…
1
vote
1 answer

Read dictionary key value in ansible using pattern/wildcard match

My variable file obtained is as below: cat myvar.yml dbname: ser1 url_ser1: url1 url_ser2: url2 dbname: ser2 my_ser1_port: 12207 my_ser2_port: 23332 To start off in the first debug, I wish to display the two key (could be more than 2 keys as well)…
Ashar
  • 2,942
  • 10
  • 58
  • 122
1
vote
5 answers

How can I create an SQL table name with spaces and wildcard characters in a MySQL table?

I am looking for a way to store a value with spaces and wildcard characters in a MySQL table. How can this be done? I have tried using mysql_real_escape_string but for some reason it still won't create a table with the wildcard characters. I've been…
John Doe
  • 3,559
  • 15
  • 62
  • 111
1
vote
1 answer

Is it possible to use the % type wild card with IN operator

I'm currently analyzing string data and I want to view the count of specific words from a bunch of text. I have something like these SELECT COUNT(text) FROM review WHERE text like "%hate%" or "%love%" but it returns counts for only "%hate%". When I…
1
vote
2 answers

Use Wildcards in Replace Function in combination with 2D Array Values

I'm trying to go through a list with two columns and replace some of the text in the second column. I want to search for values using wildcards in combination with a value inside a 2D Array. I've a file with all Pokemon cards separated in different…
1
vote
0 answers

Compute variable with wildcard on variable names in SPSS?

I have a dataset with variables that start with category 'RC' and end wih a number that corresponds to a brand. The middle letter refers to a product. For example: RC_x_1 RC_b_1 RC_g_1 RC_x_2 RC_b_2 RC_g_2 etc. Each variable has 5 values. I want to…
1
vote
1 answer

Wild card throws incompatible types error for non-static nested class

I've started learning generics and I've come across a compilation error regarding wildcards that I don't understand. Consider the following partial implementation of a LinkedList: public class LinkedList { Node head; private class…
jonyB
  • 9,257
  • 2
  • 8
  • 11
1
vote
1 answer

Snakemake glob_wildcards with multiple input suffixes

I am wondering if there is a way to define wildcards when the input files are named slightly differently. In this case FASTQ files have different suffixes - some end with '_L001_R1_001.fastq.gz' and some with 'R1_001.fastq.gz'. I'm hoping to use…
ksw
  • 313
  • 3
  • 11
1
vote
1 answer

Snakemake error "Not all output, log and benchmark files of rule contain the same wildcards

I have a barebone snake file as follows as a test/demo, but it kept on producing errors: Not all output, log and benchmark files of rule test contain the same wildcards. Here is the snakefile content: samples = ['A', 'B', 'C'] rule test: …
1
vote
2 answers

How to read parquet files in pyspark from s3 bucket whose path is partially unpredictable?

My paths are of the format s3://my_bucket/timestamp=yyyy-mm-dd HH:MM:SS/. E.g. s3://my-bucket/timestamp=2021-12-12 12:19:27/, however MM:SS part are not predictable, and I am interested in reading the data for a given hour. I tried the…
Silpara
  • 639
  • 1
  • 8
  • 14