Q:

How to get rid of data frame name in `deparse(substitute())`?

Just like in question: How to get rid of data frame name in deparse(substitute())? 
For example, create a simple function:
foo<-function(x){
  print(
    paste(
      'This is called', deparse(substitute(x))
      )
    )
}

Feeding it with a vector gives desired behaviour:
test<-1:3
foo(test)
[1] "This is called test"

But when I pass a column of data frame it includes data frame name:
> df<-data.frame(ones=c(1,1,1), twos=c(2,2,2))
> foo(df$ones)
[1] "This is called df$ones"

How to get rid of this df$ in output to get "This is called ones" (hopefully with no use of regular expressions)?

A:

The way to do this seems not to put this into the function but to use he function that was presented in the question like this:
with(df, foo(ones))

Of course, one could modify the function to remove everything up to $ but there are other ways to specify this such as DF[["ones"]] and this line of fixing it up seems to get into an endless hole of finding new situations that have to be fixed up.
# not recommended
foo2 <- function(x) {
  Name <- sub(".*\\$", "", deparse(substitute(x)))
  print( paste('This is called', Name) )      
}
DF <- data.frame(ones = 5:6)
foo2(DF$ones)
## [1] "This is called ones"

Really the problem is the design of foo. Functions such as lm that involve column names and data frames use a call which separates them:
foo3 <- function(x, data = parent.frame()) {
  Name <- deparse(substitute(x))
  print( paste('This is called', Name ))
  data[[Name]]
}

ones <- 3:4
foo3(ones)
## [1] "This is called ones"
## [1] 3 4

DF <- data.frame(ones = 5:6)
foo3(ones, DF)
## [1] "This is called ones"
## [1] 5 6

or another design would be to specify the column as a formula:
foo4 <- function(formula, data = parent.frame()) {
  Name <- all.vars(formula)[1]
  print( paste('This is called', Name ))
  data[[Name]]
}
DF <- data.frame(ones = 5:6)
foo4(~ ones, DF)
## [1] "This is called ones"
## [1] 5 6

ones <- 4:5
foo4(~ ones)
## [1] "This is called ones"
## [1] 4 5

