Edulink One has some functions that are compatible with RegEx to help narrow down the patterns of your search.
RegEx stands for Regular Expression. It is a powerful tool you can use to make matches when searching in certain fields within Edulink One, such as the Load User Accounts table in the Login tab and the Exclude Documents by Summary function within the Documents tab. It is a programming language ( Python, Java, Javascript) that follows syntax to help the computer search for what you are looking for within specific patterns of text.
RegEx is character-based rather than word-based, but it is heavily related to grammar. Each individual character or operation that is used has a meaning and purpose. There are literal characters (literally the individual character you are typing, e.g. A) and special characters that have a specific meaning.
Literal Characters
You can search for simple characters using RegEx: abcdefg, 123456 and so on. For example, if you search for the characters Year, RegEx will search for the character Y followed by ear respectively. RegEx will look for this exact combination of letters and is case sensitive. If you search for Year 9 RegEx will look for Y followed by ear, then a white space (\s) and then number 9 in this exact order.
One way you can use literal characters to search is by using the letter N (code is not case sensitive here) and it will bring up a list of employees, parents and learners that have never logged in. You can write the whole word ‘Never’ but the character ‘N’ works as well.
Special Characters within Literal Characters
Within the literal characters category, there are special characters with specific meanings. Normally, if you have used any of these characters, you will need to ‘escape’ them so the computer reads them as literal and not the special meaning.
Character | Meaning |
. | The full stop means to search for all characters, but not newline spaces. |
\ | The backslash is very important because it allows you to ‘escape’ the special meaning of the characters. If you want a full stop to read as a full stop to the computer, you need to include the backslash before the full stop to cancel out the special meaning, e.g. \. . This will allow the computer to read your full stop as literal. |
\\ | Much like any special character, if you want a backslash to read as a backslash you must include the ‘escape’ before it \\. |
\d | Means a digit (0-9) and will search for any digit in your text. |
\D | Not a digit (0-9) and will look for any other character include letters, spaces and special characters. |
\w | Word character (a-z, A-Z, 0-9, _) will look for letters, digits and underscores. |
\W | Anything that is not a word character, mostly special characters and spaces. |
\s | Whitespace (spaces, tab, newline). |
\S | Anything that is not a white space. |
@ | Searches for email addresses (useful in our Login Tab in the Load Accounts table— just type @ in the Email field). |
Anchors
Anchors are characters that help map out positions before or after new characters. This is helpful if you are searching for the start or end of something.
Character | Meaning |
\b | A word boundary. This will literally search for the beginning of a line, e.g. \b Reports will search for any line beginning with the characters Reports (remember it looks for each individual letter and not the word as a whole; it is also case sensitive). If you type in \b reports\b it will look for reports at the beginning and end of a line. |
\B | Searches for characters at the end of a line only. If you type in \B Year 9 Reports, the computer will only look for the characters for Year 9 Reports at the end of a line. |
! | Negates a search, meaning it will look for something that is not there. In Load User Accounts in Login, one of the useful regular expressions you can use is !@ which will search for any person without an email. If you type this in the Email field, it will then bring up a list of all employees, learners and parents without an email address. !, will filter out parents with more than one child in the Children column. |
^ | Looks for the beginning of a string (line) (similar to \b). |
$ | Looks for the end of a string(line) (similar to \B). |
| | Using a pipe means you are looking for a particular thing |(or) another thing, e.g. Year 11 Mock Results|UCAS. This looks for Year 11 Mock Results or UCAS. In our Exclude Documents by Summary function in the Documents Tab, you can exclude documents from being visible to parents and learners by using RegEx like the example above. This would hide Year 11 Mock Results and UCAS documents from these groups until you are ready. |
Metacharacters
Metacharacters are made up of literal characters, special characters (part of literal characters) and character sets. A character set is made with an open square bracket [ and a closed square bracket ]. If you have used these characters when you have created documents, you will need to escape them \ if you want them to read as a square bracket.
The square brackets are useful because it narrows down what you are searching for and protects it— only looking for the characters within it.
For example, 08[00|08]\s\d\d\d\d\d\d\d\ will look for 0800 or 0808 numbers (though this is probably a bit too long and complex for practical use). Another example is if you type in ^.* Year ([8-9]) meaning the computer will look for all Year 8 and Year 9 students.
Character | Meaning |
[1-9] | Specifies a range of numbers between 1 and 9. |
[a-z] | Specifies a lowercase character set. |
[A-Z] | Specifies an uppercase character set. |
[a-z A-Z] | Specifies the whole alphabet with all cases. |
[^] | If you use a caret ^ within the square brackets, it acts as a negator; for example [^a-z] matches everything BUT lowercase characters. |
Quantifiers
Quantifier characters in RegEx tell the computer the number of something to look for.
Character | Meaning |
* | 0 or more |
+ | 1 or more |
? | 0 or 1. This character essentially lets you search for options. |
{ } | Exactly this number. The curved brackets with a number inside, e.g. {8} looks for exactly for 8 of something. |
{ , } | Min and Max. For example, if you write {3,6} you are looking for a minimum of 3 and a maximum of 6 of something. |
Most of the time you will need to escape quantifiers in Edulink One if you include them in your text. If you need to escape a quantifier in a document title, simply add a backslash \ before the quantifier.
An example of where it might be useful is if you are looking for a title and names such as Mr, Mr., Mrs, Mrs., Ms, Miss, Msr etc… This can be using brackets to help group the different options you can search for, allowing the computer to match them all.
E.g.
M(r|s|rs|iss|rs)\.?\s[A-Z]\w*
This expression searches for the title of the person, with or without a full stop \.?, a space \s and then a capital letter and any other character \w (letters) with 0 or more letters *.
This is a basic outline of regular expressions and how we might use them in Edulink One. Most of the time you will likely be searching for basic things like email @, no email !@, or Year groups ^.* Year([7-13]). You might also be using the pipe to separate documents you wish to exclude Year 8 Autumn Reports | Year 11 A2L Autumn or the backslash \ to escape special characters.
This guide is giving you a bit more information and an overview of how regular expressions work. For more information, there are articles and tutorials online to help you further.