I am relatively new to regex expressions and needed some advice.
The goal is to the get data in the following format into an array:
- value=777
- value=888
From this data: "value=!@#777!@#value=@#$888*"
Here is my code (Objective C):
NSString *aTestString = @"value=!@#777!@#value=@#$**888***";
NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"value=(?=[^\d])(\d)" options:0 error:&anError];
So my questions are:
1) Can the regex engine capture data that is split like that? Retrieving the "value=" removing the garbage data in the middle, and then grouping it with its number "777" etc?
2) If this can be done, then is my regex expression valid? value=(?=[^\d])(\d)