Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
RegExp issue (cap)
vtestv last edited by
I have this expression and I've been trying to get different parts from it using cap.
Alib-1.1-1.h234 [9: alic = 1.1-1]
I was able to get:
cap(1) = 1.1-1
cap(2) = h234
cap(3) = I'm trying to get the character 9.
I don't have acces to my code right now, so I will update the topic soon with the regexp I use so you could tell me where I'm wrong, but in the meanwhile, if someone has an idea how to get the character 9, it would be very appreciated.
sidewinder last edited by
try that one: @\d(?=: alic)@
if 9 is not necessary a digit change \d to . (dot) for example. If alic may be variable try to look ahead for colon only.