如何找到没有目录的所有 URL?
How do I find all URLs without a directory?
下面的表达式似乎对我不起作用,我不明白为什么。
regexpIgnoreCase:^https?://www.aaaaaaa.com/[^/]*$
我正在尝试 select 给定域下不包含目录的所有 URL。关于如何执行此操作的任何建议,特别是为什么上述方法不起作用?
谢谢
试试这个
regexpIgnoreCase:^https?:\/\/www.aaaaaaa.com\/[^\/]*$
正如 docs 所说:
Regular expressions...:
- Are case sensitive unless you specify regexpIgnoreCase:
- Must use two escape characters (a double backslash "\") when reserved characters are added to the regular expression.
然后关联的示例显示 .
s 必须转义:
regexpIgnoreCase:http://www\.Example\.Google\.com/.*/IMAGES/
因此您的示例可能需要如下所示:
regexpIgnoreCase:^https?://www\.aaaaaaa\.com/[^/]*$
下面的表达式似乎对我不起作用,我不明白为什么。
regexpIgnoreCase:^https?://www.aaaaaaa.com/[^/]*$
我正在尝试 select 给定域下不包含目录的所有 URL。关于如何执行此操作的任何建议,特别是为什么上述方法不起作用?
谢谢
试试这个
regexpIgnoreCase:^https?:\/\/www.aaaaaaa.com\/[^\/]*$
正如 docs 所说:
Regular expressions...:
- Are case sensitive unless you specify regexpIgnoreCase:
- Must use two escape characters (a double backslash "\") when reserved characters are added to the regular expression.
然后关联的示例显示 .
s 必须转义:
regexpIgnoreCase:http://www\.Example\.Google\.com/.*/IMAGES/
因此您的示例可能需要如下所示:
regexpIgnoreCase:^https?://www\.aaaaaaa\.com/[^/]*$