abdur rahim - 4 months ago 30

Java Question

I want to find tin number from a String of specific pattern where tin number start with with 8 or 9

`input:`

sample1="passport=11231&tin=91312312313&dl=12313"

sample2="tin=81312312314&dl=12313&passport=11231"

sample3="dl=12313&passport=11231&tin=71312312313"

Expected output:

91312312313

81312312314

false

Current output:

91312312313

81312312314

71312312313

I have tried that, but it returns tin numbers that doesn't start with 8 or 9

`tin=(.*?)[$&]`