VS Regex ?

  • Thread starter Thread starter Jarod
  • Start date Start date
J

Jarod

Hey
In the find / replace option we have regular expresions , so how to
find/replace something like this:
myfunction("myarg",somethingToBeReplaced);

I tried the following:
,.+[)]; < - it finds everything after "," what ends with ");"
How to upgread it to find everything after "," and before ");" ? I tried
using < and > but it doesn't worked for me.
Jarod
 
Jarod said:
myfunction("myarg",somethingToBeReplaced);

I tried the following:
,.+[)]; < - it finds everything after "," what ends with ");"
How to upgread it to find everything after "," and before ");" ?

This will exclude the closing parenthesis:

,[^)]+

And so will this:

,.+~~\)

But both of these include the leading comma, which you don't want,
right? So this should work:

~~,.+~~\)

But it doesn't. It still includes the leading comma. Same with this:

~~(,).+~~\)

And this:

~[^,].+~~\)

And this:

~([^,]).+~~\)

As far as I can tell, the ~ has a bug. It doesn't work at the start. It
only works at the end of the pattern.

-- Peter Gummer
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Newbie question about Regex 8
regex options 1
Regex help 8
Obfuscate Email 1
Regex: How to find a "<" less than Symbol 3
Regex help 1
Help with Regex to parse dlg template controls 1
RegEx, Match but not include 4

Back
Top