-
-
Notifications
You must be signed in to change notification settings - Fork 382
Look at making regex "search within strings" by not having boundaries #68
Copy link
Copy link
Closed
Description
Currently regex have boundaries which mean they only match if the text matches exactly.
I suggest we implement a mode for changing these boundaries and allowing people to use find_all(regex) to find "regex within strings".
Example:
abc192.168.0.1xzy
Does not work because the IP address regex has boundaries, whereas:
192.168.0.1
does work.
I'd also suggest implementing this with filtering, so we can disable the boundaries on regex that match a filter, for example:
All regex with rarity over 0.6 will have no boundaries
Because the boundaries are hard-coded in, like:
"^[13][a-km-zA-HJ-NP-Z1-9]{25,34}$",
I'm not sure on the best method to go around doing this? Ideally we have a conditional to remove the boundaries or not. Perhaps we want something like:
{
"Name": "Bitcoin (₿) Wallet Address",
"Regex": "^[13][a-km-zA-HJ-NP-Z1-9]{25,34}$",
"Regex_Without_Boundary": "[13][a-km-zA-HJ-NP-Z1-9]{25,34}"
}Suggestions are welcome, I'm not 100% sure on the best way :-)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels