J
Josselin
I don't manage very well the gsub function, not too bad with simple
one, but when it comes to string containing slashes, I totally mess it..
my string can be srt = "/cities/31550/posts;search"
and I would like
1- detect that srt is a string of this type /cities/ nnnnn
/posts;search" where nnnnn is a number between 1 and 99999
2- if srt is of this type, then replace the number nnnnn by another one ppppp
don't know how to do that in one DRY command...
thanks to the gsub guru ....
btw : what's the best link to learn more abour gsub... ?
one, but when it comes to string containing slashes, I totally mess it..
my string can be srt = "/cities/31550/posts;search"
and I would like
1- detect that srt is a string of this type /cities/ nnnnn
/posts;search" where nnnnn is a number between 1 and 99999
2- if srt is of this type, then replace the number nnnnn by another one ppppp
don't know how to do that in one DRY command...
thanks to the gsub guru ....
btw : what's the best link to learn more abour gsub... ?