What exactly was your question?
Retina, 13 11 bytes
!`[^.?!]*\?
Try it online!
!` print all matches
[^.?!]* any number of non-ending-punctuation symbols
\? followed by a question mark
Thanks to @MartinEnder for 2 bytes!
Python, 46 Bytes
import re
f=lambda s:re.findall("[^!?.]*\?",s)
Call with:
f("your string here")
output on tests:
['Can u please help me,or my friends,with formatting this question ?', 'Can u please help me,or my friends,with formatting this question ?', ' Huh?', ' Could you repeat that please?', ' plz can i haz cheesburgr?', 'd?', 'Does this question have a question mark?', '9 percent of cases?', 'A?', ' b?', ' c?']
another idea, 77 bytes (in python3 you'd need a list around filter):
import re
f=lambda s:filter(lambda x:x[-1]=="?",re.split("(?<=[\.\?!]).",s)))
I'm new to this so this, so this could probably be much shorter.
-17 (!) bytes thanks to Martin
-2 bytes by matching anything that is not "!","?" or "." (Getting close to the shell solutions, but I doubt I could save much more)
JavaScript, 35 24 bytes
a=>a.match(/[^.?!]*\?/g)
Returns all substrings that start after a .
, ?
, or !
(or the beginning of the text) and end in a ?
.