Is your feature request related to a problem? Please describe.
Many times MCNP objects are identifiable by their comments, and less so their number. It's desirable to be able to find objects by what their comments contain.
Describe the solution you'd like
I was thinking in NumberedOjbectCollection (also it may be time to make MCNP_Problem.data_inputs its own class) of implementing something like:
import re
def get_by_comment(self, searcher: str | re.Pattern): -> Generator[MCNP_Object, None, None]
pass
Or also possible following montepy.Materials.get_containing_(all|any) where you can search by multiple strings.
Describe alternatives you've considered
For now users can just do this manually (after #i972).
Additional context
This is a follow-on to #185.
Is your feature request related to a problem? Please describe.
Many times MCNP objects are identifiable by their comments, and less so their number. It's desirable to be able to find objects by what their comments contain.
Describe the solution you'd like
I was thinking in
NumberedOjbectCollection(also it may be time to makeMCNP_Problem.data_inputsits own class) of implementing something like:Or also possible following
montepy.Materials.get_containing_(all|any)where you can search by multiple strings.Describe alternatives you've considered
For now users can just do this manually (after #i972).
Additional context
This is a follow-on to #185.