regex invalid quantifier error.
Copy link to clipboard
Copied
Maybe someone can help with this error. I am using Adobe Dreamweaver 19.2.1.
I receive the following error when executing my find and replace string and selecting replace all. Regular expression syntax error: invalid quantifier.
Code I am searching <table cellspacing=0 border=0 cellpadding=2 width=312>
Search string =(?<!")\b(\d+)\b(?!")
Replace string ="$1"
I do not recieve the error if I simply select replace. Adobe makes the appropriate changes with no error. The error only occurs if I click replace all.
Thanks
Copy link to clipboard
Copied
There is nothing wrong with the search or replace string.
It seems that sometimes, the "Replace All" function can cause issues in Dreamweaver if the regular expression is complex.
Maybe consider updating Dreamweaver to the latest version - May 2024 release (version 21.4)
Copy link to clipboard
Copied
Thanks . The search string gives me the same error in Dreamweaver 21.4 on WIN 10.
Any work arounds ? ive been seaching and googling for serveral days.
Copy link to clipboard
Copied
The error "Regular expression syntax error: invalid quantifier" typically occurs when there's an issue with the quantifier in your regular expression. A quantifier specifies how many times a character or group should be matched, and it must be correctly formatted.
In this case, the error might be due to the use of lookbehind assertions ((?<!") and (?!")). Lookbehind assertions are not supported in all regular expression engines, which could be causing the issue.
Try this modified search string: (?<!")(\d+)(?!")
Copy link to clipboard
Copied
Thanks I tried the new search string. Same quantifier error. the Dreamweaver error message box strips off the first 2 characters of the search string . Could this be some indication if the Quantifier error?
The equals sign is part of my search string. =(?<!")(\d+)(?!")
Copy link to clipboard
Copied
The equals sign is part of my search string. =(?<!")(\d+)(?!")
By Carl379159581cjb
Sorry, I did not realise.
Try:
Search String: =(\d+)
This expression looks for an equals sign followed by one or more digits.
Replace String: ="$1"
This replace string adds double quotes around the found numeric value.

