#1
|
|||
|
|||
Case-Insensitive Regex Flag \\i ?
When using regex in jDownloader rules, I've found posts that claim that starting the expression with \\i makes the regex case-insensitive.
I've tested this dozens of times and I cannot get it to work. If I remove the \\i" from the beginning of a regex expression, it will work fine (when the case matches). When I add only the \\i - the expression no longer works. I've never been able to confirm this is the correct method; my only source comes from searches on this forum. Am I doing something wrong / should I be using a different code? Thank you in advance |
#2
|
||||
|
||||
@MediaFanatic:
please see Java Pattern docs docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html#CASE_INSENSITIVE Quote:
disable them by disabling them inline, for example Quote:
__________________
JD-Dev & Server-Admin |
#3
|
|||
|
|||
@Jiaz - Thank you, as always, you provided exactly the answer I needed and it now works perfectly!
I was not aware that jDownloader rules use the standard Java Pattern/flags, despite searching on this topic. For sake of others who might be Googling for this information, I'll include some additional keywords: Regular Expressions Case-Insensitive Search - Solved: Prefix the Regex expression with (?i) for example (?i)(.*)?(SearchString)(.*)?$ Note: Due to the dotall, we explicitly refer to the end-of-line with pessimistic capture prior, to avoid capturing new-line characters. |
#4
|
||||
|
||||
Quote:
Names and URLs don't have newlines in them
__________________
JD-Dev & Server-Admin |
|
|