Regular Expression for alphanumeric and underscores

To match a string that contains only those characters (or an empty string), try This works for .NET regular expressions, and probably a lot of other languages as well. Breaking it down: If you don’t want to allow empty strings, use + instead of *. As others have pointed out, some regex languages have a shorthand form … Read more

What would I use git-worktree for?

For me, git worktree is the biggest improvement since a long time. I’m working in enterprise software development. There, it is very common that you have to maintain old versions like what you released 3 years ago. Of course you have a branch for each version so that you can easily switch to it and … Read more

How to fetch all Git branches

You can fetch all branches from all remotes like this: It’s basically a power move. fetch updates local copies of remote branches so this is always safe for your local branches BUT: fetch will not update local branches (which track remote branches); if you want to update your local branches you still need to pull every branch. fetch will not create local branches (which track remote branches), you … Read more

R issue “object not found”

Here’s my guess at what might work the way you wanted: You should realize that the rest of my_data will have evaporated and be garbage collected after return from the elbow call. I could have showed you how to use your original expression following attach(), which would have been arguably safe within that function, but that would have … Read more

Categories R