Top "Gsub" questions

Ruby, Lua, R and Awk methods for performing a global pattern substitution.

Regex return file name, remove path and file extension

I have a data.frame that contains a text column of file names. I would like to return the file …

regex r gsub
keep only alphanumeric characters and space in a string using gsub

I have a string which has alphanumeric characters, special characters and non UTF-8 characters. I want to strip the special …

r regex string utf-8 gsub
Ruby Undefined method downcase

I'm getting an exception in the following piece of code. Can someone please tell me what I'm doing wrong, and …

ruby exception gsub
Modifying a character in a string in Lua

Is there any way to replace a character at position N in a string in Lua. This is what I've …

string lua gsub lua-patterns
Using dplyr + gsub on many columns

I'm using dplyr and gsub to remove special characters. I'm trying to translate a code I had with base R. …

r dplyr gsub
Add space between two letters in a string in R

Suppose I have a string like s = "PleaseAddSpacesBetweenTheseWords" How do I use gsub in R add a space between the …

regex r gsub
R extract first number from string

I have a string in a variable which we call v1. This string states picture numbers and takes the form …

regex r gsub strsplit
Regex / Remove slash from string in ruby

Thanks in advance... I am having some trouble with regular expressions in ruby, or otherwise finding a way to remove …

ruby regex string gsub slash
How to remove + (plus sign) from string in R?

Say I use gsub and want to remove the following (=,+,-) sign from the string and replace with an underscore. …

r gsub stringr
Ruby match first occurrence of string for a gsub replacement

I have a string let's say http://someUrul.com/someController/SOmeAction?SomeQS=http://someOtherUrl and I want to replace the …

ruby regex gsub string-substitution