Questions tagged [metacharacters]

metacharacters are non-alphanumeric characters which are part of the processing model of a program rather than the literal value of a string

References

84 questions
0
votes
0 answers

Vba: Metacharacter "*" doesn't work to specify file name when trying to use method "Open" to open a workbook

I have the following short vba code to open a file which name begins with the string "QryCECARFSECTORIAL". Neverthless, since the file name is not composed only by that string and it varies every day, I've used the metacharacter "*" as following:…
Mauro
  • 477
  • 1
  • 9
  • 22
0
votes
0 answers

How to perform input validation on bash arguments injected with \r?

I have a bash file, that takes one argument. This is used within ConfD CLI, for a command. However, if the user uses \r metacharacter, it throws my program off. Example (on ConfD shell): somecommand hellooooo\rtest On displaying $@ within my bash…
Shravan J Kumar
  • 158
  • 1
  • 1
  • 10
0
votes
2 answers

Escaping a long sequence of metacharacters in the Java .replaceAll method

I have been trying to solve this problem for a while now, I am using .replaceAll to remove any character in a String that is not a letter or number. I tried using Pattern.quote(), but I was unable to make it work correctly. Then I tried using \Q…
0
votes
0 answers

Unexpected meta character at xsd pattern

I have a pattern in an xsd file to check a json value in an xml file is valid for my system. I am getting an unexpected meta character error when i run the validation stage. I checked meta characters but, i couldn't see the meta character that…
SherlockHomeless
  • 153
  • 2
  • 10
0
votes
2 answers

I'm trying to learn about Regular Expressions

1.Based on this code https://docs.oracle.com/javase/tutorial/essential/regex/test_harness.html Can anyone please explain what is this \"%s\" in while (matcher.find()) { console.format("I found the text" + " \"%s\" starting at " + …
Aashit Garodia
  • 330
  • 1
  • 11
0
votes
1 answer

sed - how to replace meta character

In the following example I am looking to include the * metacharacter in the string replacement. If I understand correctly, I should be able to escape the character using \ but after doing that this is the result I am seeing: ❯ echo 'foo(*)' | sed…
Jack Rowlingson
  • 325
  • 2
  • 9
0
votes
2 answers

Unable to recreate DataRow for relationship in Laravel Voyager

I upgraded to laravel 5.5 and Voyager 1.0 and am using mysql on a vagrant box. I want to add an entry on the data_rows table for a relationship between a User and a Store. I'm able to create the entry using Voyager's gui. Which creates the…
WhyAyala
  • 647
  • 7
  • 29
0
votes
0 answers

[BASH]: Metacharacter * returns results in increasing lexicographic order?

Observe the following example commands in bash: jason@MacBook:~ mkdir temp jason@MacBook:~ cd temp jason@MacBook:~/temp touch file.txt jason@MacBook:~/temp touch file1.txt jason@MacBook:~/temp touch file2.txt jason@MacBook:~/temp ls file* file.txt …
Jason
  • 2,495
  • 4
  • 26
  • 37
0
votes
0 answers

Java String.Matches();

Why does the syntax below output false? I know that the \\S is a none white space character, and that the \\w is a word character. Please feel free to tell me I'm wrong on that. Here is the…
Benton Justice
  • 111
  • 1
  • 2
  • 7
0
votes
1 answer

Find brackets using grep

Is there a simple way to grep both brackets in a single line of code. I would like to include opening [ and closing ] bracket in a single line of code. I have tried all kinds of combinations but it seems only one at a time is possible. I have the…
rjss
  • 935
  • 10
  • 23
0
votes
2 answers

How to open browser on windows with url which contains metacharacters

I tried to open browser with different ways something like this system('start ' . $url) or use special module Browser::Open He opened url , but not all , only http://host.com/cgi-bin/nagios3/status.cgi?hostgroup=all I forgot to notice , i need to…
Dima Candu
  • 25
  • 1
  • 6
0
votes
1 answer

Javascript "any string" regex in Handlebars?

I am trying to compare a String with another one which contains a regex in Handlebars, and I am wondering if is there any meta character I can use to represent any String. In other words, I want that the word "Resource" in the following snippet can…
stack man
  • 2,303
  • 9
  • 34
  • 54
0
votes
1 answer

how to send ctrl + c to another screen?

I am trying to send ctrl + c to another screen. How can I do this? screen -S railsServer -p 0 -X stuff $'\cc' screen -S railsServer -p 0 -X stuff $'^C' However these don't seem to work.
bezzoon
  • 1,755
  • 4
  • 24
  • 52
0
votes
2 answers

how to replace a part of string when it contains a metacharacter in perl

I have strings that look like this for example subnet 1 ims-0-x ip address and I want to get rid of the -x so it will be subnet 1 ims-0 ip address I tried doing this regex replace $string=~ s/\\-x//; which is not working. I think my issue is that I…
0
votes
2 answers

How to search for term "AI" with regex

I am trying to figure out how to write a regex expression that returns the word "AI" without returning words that contain "ai". My guess is that I would need to use operators that return "ai" only if there is whitespace one character to the left of…