A regular expression and a Windows permission (cacls) question

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 3K views
Crosshash
Messages
50
Reaction score
0
Hello, firstly, what does the regular expression "\\+" do? Would that literally match up "\+". Could I possibly get some recommendations on some software to try regular expressions with as well actually please?

and secondly, I've been fiddling around with the cacls command and I've noticed that it doesn't seem to be able to give users "modify" access. It can

give read, write, change and full control to users but not modify (and I think some others too). How do you grant modify access to a file in the command line?

(this is for my coursework and I'm kind of stumped on these two questions).

Thanks guys.
 
Physics news on Phys.org
Most likely, the question is about the regular expression without quotes. The regular expression \\+ matches the character \ literally. The + is the quantifier which matches between one and unlimited times.

In a different case - i.e. if we also include the quotes, the reg ex "\\+" matches the characters " and \ literally. For the character \ the expression uses the quantifier + which matches between one and unlimited times. It also matches the character " in the end.

Nowadays, with a simple google search, we can find a number of free online software applications for regular expressions of various flavors (PCRE, ECMAScript etc.) which help in learning about, testing, debugging, generate code etc.

The cacls command, which is an abbreviation for change access control lists, is a command line utility for displaying and modifying the security descriptors on folders and files. An access control list is a list of permissions for the object (file or folder) at hand. cacls has had a long history with the Windows operating system. Quoting from docs.microsoft.com : "The original cacls shipped with Windows NT 4.0 and enabled a set of basic capabilities for changing permissions at the command line but was limited in what it could accomplish. To resolve these limitations, Microsoft subsequently released an expanded xcacls in the Windows NT Resource Kit. Later yet, an unsupported xcacls.vbs was released that went further with capability but backward in terms of performance. ". Microsoft subsequently released - 2007 as initial release, icacls as cacls replacement, which is a full-featured version from Windows Server 2003 Service Pack 2 on and includes among others the modify capability, not present in the cacls command.