Teddybugs
Teddybugs

Reputation: 1244

how to use regex to match this pattern

i want to search following pattern:

any_var.add(anything.substring(any))

as long is it match with:

*.add(*.substring(*))

how to do that in regex? Im using java.

Upvotes: 0

Views: 31

Answers (1)

JoelFan
JoelFan

Reputation: 38714

Try:

.+\.add\(.+\.substring\(.+\)\)

Upvotes: 1

Related Questions