I have a String like following:
String text = "This is awesome
Wait what?
[[Foo:f1 ]]
[[Foo:f2]]
[[Foo:f3]]
Some texty text
[[Foo:f4]]
Now, I am trying to write a function:
public String[] getFields(String text, String field){
// do somethng
}
enter code hereshould return [f1,f2,f3,f4] if i pass this text with field = "Foo"
How do i do this cleanly?