Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

regex invalid quantifier error.

Community Beginner ,
Nov 10, 2024 Nov 10, 2024

 

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(?!")regex_error.JPGexpand image

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

TOPICS
Code , Error , How to
336
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 10, 2024 Nov 10, 2024

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)

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 10, 2024 Nov 10, 2024

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. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 10, 2024 Nov 10, 2024

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+)(?!")

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 10, 2024 Nov 10, 2024

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? 

Regex_error_3.JPGexpand image

The equals sign is part of my search string.   =(?<!")(\d+)(?!")

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 10, 2024 Nov 10, 2024
LATEST
quote

 

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.

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines