1

I am trying to find and replace in notepad++. For example I want to replace

border-radius: 2px 3px 2px;

I am using this code to find:

border-radius: ([^A-Za-z]*);

But my expression only search for this types of code (which have only one radius value):

border-radius:2px;

Please tell me how to find:

border-radius: **** ;
2
  • By first, one question mark would be enough. And by second - have you ever read about regexp syntax? All you need is to add repetition of your capturing group and a space. Commented Apr 14, 2013 at 12:52
  • too many question mark cuz stackoverflow does not allow comment below 14 letter. No I have'nt yet Commented Apr 14, 2013 at 12:56

1 Answer 1

2

If you want to find border-radius: followed by anything, just relax your constraint:

border-radius:(.*?);

The . means any character. The * means any number of them. But the ? limits that to minimum matches possible, meaning that it stops on the first ; (otherwise the pattern would match whole line, were there multiple rules on the line).

Sign up to request clarification or add additional context in comments.

1 Comment

I actually thought he wants to get the border radius values captured in separate capturing groups.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.