Does Postfix recipient_delimiter take multiple characters? [closed] - postfix-mta

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
According to this documentation, there is nothing stating if the delimiter can be multiple characters or a string. Can someone confirm if it is possible to use a string as the delimiter? Perhaps something like "-----"?
http://www.postfix.org/postconf.5.html#recipient_delimiter

After reading the source code it looks like that variable eventually gets used as an int. So the delimiter can only be a single character.
However, since Postfix 2.11, there can be multiple delimiters:
When the recipient_delimiter set contains multiple characters (Postfix 2.11 and later), a user name or .forward file name is separated from its extension by the first character that matches the recipient_delimiter set.
Source: http://www.postfix.org/postconf.5.html#recipient_delimiter

Related

How to skip lines based on a string in R? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 days ago.
Improve this question
How to skip lines based on a string in R?
Im attempting to create a df from a tsv file and I need to skip lines after a delimiter string "[data]". So I want to know how many lines I need to skip to grab the header located below the "[data]" string.
In python I would load the file as a string and find the line number. But I can figure it out on R.

Can I use Grep or Grepl to return instances of two capital letters together in text? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I'm interested to pull out instances where initials are used in my text data, as they are almost always two capital letters, is there a simple way to look for this text pattern using Grep in R?
If we need to match two upper case letters from the start (^) of the string, use grepl on the column concerned to return a logical expression within subset to subset the rows
subset(df1, grepl("^[A-Z]{2}", col1))

Specific code from SAS to R [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
I am trying to write this (SAS) comand in R. x is a variable with this specific format: j61915035t
x1 = trim(upcase(substr(x,1,1)));
I really appreciate what you are doing in this site!
You want to remove leading/trailing blanks from a character string that is the uppercase first letter of the string x. So this should do it.
library(stringr)
x1 = str_trim(str_to_upper(str_sub(x,1,1)))

Why does data get altered while applying a function [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I loaded a RDS file. The file contains a numeric field. When I say
class(NEI$Emissions)
it returns
"numeric"
The data is in maximum 3 digits and contains 3 digits of decimal. However, when I issue the command
max(NEI$Emissions)
it returns a huge number.
646952
How can I use the numeric values as it is?
R doesn't lie. One of your data points is not what you expect.
Find which row has the problem with this command:
which.max(NEI$Emissions)
then examine that row of your original data. You will find the errant value.

Regular expression to match 'R33' and 'r34E' [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am looking for a regular expression that matches R33 and r34E. I tried (R|r)[0-9]{2}+[A-Z]{1} but got an error.
/[rR][0-9]{2}[A-Z]?/
It is an invalid Regular Expression. If you want to have 2 or more digits, {2}+ won't work, you should use {2,}.
(R|r)[0-9]{2,}[A-Z]?
[0-9]{2}+
That plus sign looks wrong. If you take that out:
(R|r)[0-9]{2}[A-Z]?
Appears to do what you want (upper- or lowercase R, two digits, optionally any uppercase letter).
Try ^(R|r)[0-9]{2}$|^(R|r)[0-9]{2}[A-Z]{1}$
Your regex is invalid.
You can use {2} or + on an expression, but not both.

Resources