search & replace with regular expressions

Post your questions and problem reports here

Moderator: kfury77

Forum rules
Please try to follow these guidelines. This will help to receive faster and more accurate response.
  • Check the Support section of the corresponding product first. Chances are you will find your answer there;
  • Do not create new topics for already reported problems. Add your comments to the existing topics instead;
  • Create separate topic for each problem request. Do NOT post a number of non-related problem reports in a single topic;
  • Give your topic a meaningful title. Titles such as "A question," "Bug report" and "Help!" provide others no clue what your message is about;
  • Include the version number of the software you are using;
  • This is not an official customer support helpdesk. If you need a prompt and official response, please contact our support team directly instead. It may take a while until you receive a reply in the forum;
Post Reply
CodeChegga
Posts: 18
Joined: Fri May 21, 2010 10:25 am

search & replace with regular expressions

Post by CodeChegga »

i'am looking for the way to write the variables containing the 1st, 2nd ... reg. expression findings to insert the original parts into the replace-string. With notepad++ i'am uses to write it \1, \2 ...
but this does'nt work in webuilder...

thanks for help & hints

Rainer
User avatar
Aivars
Blumentals Software Developer
Posts: 2462
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: search & replace with regular expressions

Post by Aivars »

The same works in WeBuilder 2014. If not, please provide some test cases (sample text, what to search for, what to replace with).
Blumentals Software Programmer
CodeChegga
Posts: 18
Joined: Fri May 21, 2010 10:25 am

Re: search & replace with regular expressions

Post by CodeChegga »

i searched for css-classes named like:
buttonbg.de
where the . dot is a regex placeholder for a one digit number

and tried to replace with

buttonbg\1en

to insert the number found in the search expression

so i#am used to from notepad++ - i never did it before in webuilder2011
User avatar
Aivars
Blumentals Software Developer
Posts: 2462
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: search & replace with regular expressions

Post by Aivars »

There is indeed a bug. With
Search: buttonbg(.)de
Replace: buttonbg\1en
Sometimes it works and sometimes it doesn't... I'll file a bug.
Blumentals Software Programmer
Post Reply