safety-orange / Imports-for-MPMB-s-Character-Sheet

Material for importing to MorePurpleMoreBetter's Character Record Sheet
158 stars 105 forks source link

Use custom word boundary that considers + as part of the word #54

Closed Smashman closed 4 years ago

safety-orange commented 4 years ago

Thank you for the suggested edit, but unfortunately AcroJS doesn't support lookbehinds for regular expressions (?<! and ?<=).

safety-orange commented 4 years ago

I have come up with another approach, by changing \b(2|two) to ((^|[^+-]\b)2|\btwo). Thus, it now only checks for the + and - signs, but that should be enough, because there should be little other reason why you use a "2" in the description or name of an attack.

I'm closing this commit now, but be free to open it if you think of a better way this can (should) be handled.

Smashman commented 4 years ago

I'm pretty sure I tested it and it worked. 🤔

safety-orange commented 4 years ago

All I get is the error "SyntaxError: invalid quantifier", using the latest version of Adobe Acrobat Pro DC: image