I’ve been working with regular expressions recently (a series of characters that define a search pattern) and wanted to share a useful testing tool I found.
https://regex101.com/ allows users to easily test expressions on sample strings and provides a useful explanation of the match conditions and information on any errors encountered.
If you’re new to Regex, give it a try.
Recently I discovered that the console log size in Firefox has a default limit, which prevented me from viewing the full output from a script I was running.
If you find yourself with the same problem, you can change the size of the console log by following these steps.
1) Access the Firefox config file by typing about:config in the browser’s address bar and hitting enter.
2) You will than likely receive a warning message about the risks of changing your browser’s configuration, which you will need to accept before proceeding. Note: Make sure you fully understand the risks of changing any configuration settings before you apply your changes.
3) Search for the preference name devtools.hud.loglimit.console, which should than appear as the only preference in the search results list.
4) Lastly, double click on the preference name and a popup window will allow you to alter the size of the console log from the default value to one you specify.
Screen-shot of changing the console log size in Firefox
The other day I needed to make a batch file, and encountered the problem of having characters (specifically spaces and parentheses), which needed to be escaped in order for the batch file to run correctly in MS-DOS.
An example of this problem would be having the following line in a batch file:
C:\Program Files (x86)\Program\executableFile.exe
This example would result in an error stating:
’C:\Program’ is not recognized as an internal or external command, operable program or batch file.
This error is caused by multiple special characters which were not escaped. To solve this problem a ‘^’ should be placed before all characters which need to be escaped (eg. spaces, parentheses, etc). See the correct example below:
C:\Program^ Files^ ^(x86^)\Program\executableFile.exe