You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For eg.
Convert rex-style [[:alpha:]](?:(?:[[:digit:]]){1,2}(?:[[:alpha:]]){1,2})(?:(?:[[:digit:]]){6,7})
to conventional style [A-Za-z](?:(?:[\d]){1,2}(?:[A-Za-z]){1,2})(?:(?:[\d]){6,7})
so they can be plugged into external (non-R) models directly.
The text was updated successfully, but these errors were encountered:
The [:alpha:] is a POSIX character classes and are actually widely used outside of R. If your language does not support them there is a table in the above link that supplies conversions. You could convert the regular expressions by defining a map and a call to gsub().
convert<-function(x) {
map<- c("\\[:alpha:\\]"="a-zA-Z", "\\[:digit:\\]"="0-9")
for (iin seq_along(map)) {
x<- gsub(names(map)[[i]], map[[i]], x)
}
x
}
convert("[[:alpha:]](?:(?:[[:digit:]]){1,2}(?:[[:alpha:]]){1,2})(?:(?:[[:digit:]]){6,7})")
#> [1] "[a-zA-Z](?:(?:[0-9]){1,2}(?:[a-zA-Z]){1,2})(?:(?:[0-9]){6,7})"
@jimhester Thank you.
That's actually how I'm handling it right now and supplying the outputs to Watson Knowledge Studio. The easy check for me is to make it compliant to this web platform.
I opened the issue as suggested by @kevinushey via Twitter.
For eg.
Convert rex-style
[[:alpha:]](?:(?:[[:digit:]]){1,2}(?:[[:alpha:]]){1,2})(?:(?:[[:digit:]]){6,7})
to conventional style
[A-Za-z](?:(?:[\d]){1,2}(?:[A-Za-z]){1,2})(?:(?:[\d]){6,7})
so they can be plugged into external (non-R) models directly.
The text was updated successfully, but these errors were encountered: