How could I optimize these Regex searches? Currently they take up to 5 seconds on my mobile phone
- Conversation:
<div class="field-items">.+?sms-notregion - Place:
(?<=de/ort/)[^"]+ - ID:
(?<=sms-share-id sms-tagline-elem">#)\d+ - Single message: sms-participant
sms-participant-.+?</div></div> - Participant:
(?<=sms-participant-)\d - Time:
(?<=sms-tag">)\d+:\d+ - messagetext:
(?<=sms-bubble">).+?(?=</div>)
I first search for conversations, then for the single messages in them and so on.
For example I have this website I am matching with: http://pastebin.com/uun0uKL1
Update. As it turned out, my regex wasn't the slow part of my code, but the use of Html.fromhtml(), that I was trying to use in order to unescape html special chars.