@ryan.murray
To extract numbers in brackets using regular expressions (regex), you can use the following pattern:
1
|
[(d+)] |
Here's an explanation of the pattern:
You can use this regex pattern with your programming language of choice to extract numbers in brackets from a string. Here's an example in Python:
1 2 3 4 5 |
import re text = "The numbers in brackets are [123] and [456]." numbers = re.findall(r'[(d+)]', text) print(numbers) |
This will output:
1
|
['123', '456'] |
You can adjust the regex pattern based on your specific requirements or the format of the input text.