As a starting point for information, the test contradicts the FULL path to the file from the ININ of each resource directory.
At first I thought that maybe his RegEx was wrong, but in fact everything looks fine. In fact, the question may be raised whether RegEx meets your needs. To break it up, you specified a regex here:
/ckeditor\/.*/
Given the following file paths provided:
- Ckeditor / blah.js
- ckeditor_blah.js
- ckEditor.main.js
- CKEditor / main.js
- in /ckeditor.css
- in /CKEditor/extra.css
- in /blockeditor/base.css
- ckeditor5 / temp.js
This will only match lines 1, 6 and 7, this is because they are looking for paths that contain the text "ckeditor /" in them. ". *" In Regex, itβs actually superfluous (I think), since it only adds that the string can contain 0 to infinite characters after "ckeditor /".
Another thing is that this is CASE SENSITIVE , so if your file path is actually ckEditor / main.js, as in the 4th line of the above example, it will not match. If you want RegEx to be case insensitive, use:
/ckeditor\/.*/i
Hope this helps you sort out the problem ... Here are some additional examples to provide more starting points:
/^ckeditor/i
This corresponds to lines 1, 2, 3, 4, and 8 in the example above, since it will look for any path starting with "ckeditor" and case-INsensitive .
/[\/]*ckeditor[\/]/i
This corresponds to lines 1, 4, 6, and 7 in the example above. This is a search for any path to the file that may (but not necessarily) begin with "/" and contains "ckeditor /"
/ckeditor.*[\/]/i
This will correspond to lines 1, 4, 6, 7 and 8. In essence, any file path containing "ckeditor {any number of any characters except a new line} /" will work.