[Question]
  [
### Introduction
When you are given a boring text, you just want to get it over with as quick as possible. Let's observe the following text:
```
Ens colligi timenda etc priorem judicem. De quascunque ii at contingere 
repugnaret explicetur intellectu. Adjuvetis hoc fortassis suspicari opportune 
obversari vix eam? Dei praemia prudens hominum iii constet requiri haberem. Ima 
sane nemo modi fuit lus pro dem haud. Vestro age negare tactum hoc cui lor. Ne et 
ut quod id soli soni deus. At constare innumera is occurret ea. Nia calebat seu 
acquiro fraudem effingo dicimus.
```
**Note:** This text has newlines for readability, while the test cases you need to handle don't have newline characters.
One way to skim text is to find questions that the writer has put into the text. For example, there is 1 question in the text above. Namely:
```
Adjuvetis hoc fortassis suspicari opportune obversari vix eam?
```
This can be done by splitting the text into sentences. A sentence will *always* end with one of the following punctuation symbols: `.?!` (others don't have to be handled). Other symbols than these are part of the sentence.
---
### The Task
Given a line of text consisting of only
* **letters (A-Za-z)**
* **numbers (0-9)**
* **spaces**
* **punctuation (`,.;:?!`)** (a sentence cannot start with one of these).
Output the questions that are in the text in any reasonable format. You may assume that the text will always have **at least 1 question**. Outputting *trailing* and *leading* spaces before and after a question is allowed.
**Important**: Next to a *punctuation* symbol, there will **never** be another punctuation symbol (e.g. `??` is invalid and will not be required to handle).
---
### Test cases
In the format:
```
Input
Output(s)
```
The test cases:
```
Huh? I haven't heard what you just said. Could you repeat that please?
Huh?
Could you repeat that please?
plz can i haz cheesburgr? i am cat pls.
plz can i haz cheesburgr?
This is a badly formatted question.Can u please help me,or my friends,with formatting this question    ?thankyou.
Can u please help me,or my friends,with formatting this question    ?
a.b.c.d?
d?
Does this question have a question mark? yes
Does this question have a question mark?
Why example.com resolves to 127.0.0.1 in 99.9 percent of cases?
9 percent of cases?
A? b? c? d!
A?
b?
c?
```
---
This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), so the submission with the lowest number of bytes wins!
  
[Answer]
## Retina, ~~13~~ 11 bytes
```
!`[^.?!]*\?
```
[Try it online!](http://retina.tryitonline.net/#code=IWBbXi4_IV0qXD8&input=SHVoPyBJIGhhdmVuJ3QgaGVhcmQgd2hhdCB5b3UganVzdCBzYWlkLiBDb3VsZCB5b3UgcmVwZWF0IHRoYXQgcGxlYXNlPwpwbHMgY2FuIGkgaGF6IGNoZWVzYnVyZ3I_IGkgYW0gY2F0IHBscy4KVGhpcyBpcyBhIGJhZGx5IGZvcm1hdHRlZCBxdWVzdGlvbi5DYW4gdSBwbGVhc2UgaGVscCBtZSxvciBteSBmcmllbmRzLHdpdGggZm9ybWF0dGluZyB0aGlzIHF1ZXN0aW9uICAgID90aGFua3lvdS4)
```
!`       print all matches
[^.?!]*  any number of non-ending-punctuation symbols
\?       followed by a question mark
```
Thanks to [@MartinEnder](https://codegolf.stackexchange.com/users/8478/martin-ender) for 2 bytes!
[Answer]
# 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)*
[Answer]
## 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 `?`.
[Answer]
# [V](https://github.com/DJMcMayhem/V), 12 bytes
```
Í[^.!?]*[.!]
```
[Try it online!](http://v.tryitonline.net/#code=w41bXi4hP10qWy4hXQ&input=SHVoPyBJIGhhdmVuJ3QgaGVhcmQgd2hhdCB5b3UganVzdCBzYWlkLiBDb3VsZCB5b3UgcmVwZWF0IHRoYXQgcGxlYXNlPwpIdWg_IENvdWxkIHlvdSByZXBlYXQgdGhhdCBwbGVhc2U_CnBscyBjYW4gaSBoYXogY2hlZXNidXJncj8gaSBhbSBjYXQgcGxzLgpwbHogY2FuIGkgaGF6IGNoZWVzYnVyZ3I_ClRoaXMgaXMgYSBiYWRseSBmb3JtYXR0ZWQgcXVlc3Rpb24uQ2FuIHUgcGxlYXNlIGhlbHAgbWUsb3IgbXkgZnJpZW5kcyx3aXRoIGZvcm1hdHRpbmcgdGhpcyBxdWVzdGlvbiAgICA_dGhhbmt5b3UuCkNhbiB1IHBsZWFzZSBoZWxwIG1lLG9yIG15IGZyaWVuZHMsd2l0aCBmb3JtYXR0aW5nIHRoaXMgcXVlc3Rpb24gICAgPw)
A very straightforward answer.
```
Í             "Remove every occurrence, on every line
 [^.!?]       "Of any character that isn't '.', '!', or '?'
       *      "Repeated any number of times
        [.!]  "Followed by a a '.' or a '!'
```
Thankfully, handling newlines, or verifying all test-cases does not add any bytes.
[Answer]
# [Jelly](http://github.com/DennisMitchell/jelly), 16 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
```
f€“.?!”0;œṗfÐf”?
```
[Try it online!](http://jelly.tryitonline.net/#code=ZuKCrOKAnC4_IeKAnTA7xZPhuZdmw5Bm4oCdPw&input=&args=Y2FuIGkgaGF6IHJlZ2V4PyBpIGFtIGplbGx5Lg) or [verify all test cases](http://jelly.tryitonline.net/#code=ZuKCrOKAnC4_IeKAnTA7xZPhuZdmw5Bm4oCdPwrhuaPigbfDh-KCrGrigbc&input=&args=SHVoPyBJIGhhdmVuJ3QgaGVhcmQgd2hhdCB5b3UganVzdCBzYWlkLiBDb3VsZCB5b3UgcmVwZWF0IHRoYXQgcGxlYXNlPwpwbHMgY2FuIGkgaGF6IGNoZWVzYnVyZ3I_IGkgYW0gY2F0IHBscy4KVGhpcyBpcyBhIGJhZGx5IGZvcm1hdHRlZCBxdWVzdGlvbi5DYW4gdSBwbGVhc2UgaGVscCBtZSxvciBteSBmcmllbmRzLHdpdGggZm9ybWF0dGluZyB0aGlzIHF1ZXN0aW9uICAgID90aGFua3lvdS4K)
[Answer]
# Shell utilities, ~~43~~ 38 bytes
Thanks to [rexkogitans](https://codegolf.stackexchange.com/users/51534/rexkogitans) for trimming 5 bytes!
```
tr ? "\n"|sed "s/.*[\.!]//;s/.\+/&?/"
```
Pipe input in, like this:
```
echo Huh? I haven't heard what you just said. Could you repeat that please?|tr ? "\n"|sed "s/.*[\.!]//;s/.\+/&?/"
```
If if matters, I'm using:
- GNU `tr` 5.3.0
- GNU `sed` 4.2.1
- Microsoft's `cmd.exe`, shipped with Windows 5.1.2600
[Answer]
## Perl 5.10, ~~21~~ 18 bytes (with *-n* flag)
```
say m/[^?.!]+\?/g
```
Straightforward implementation of the question. 
[Try it here!](https://ideone.com/EG3fmR)
[Answer]
# Ruby 1.9, 17 bytes
```
$_=$F
```
A 5 bytes program that must be invoked with the following command line options:
```
paF[^?]*[.!]
```
[Answer]
## Batch, 174 bytes
```
@echo off
set/ps=
set t=
:l
set c=%s:~0,1%
set t=%t%%c%
if "%c%"=="?" echo %t%&set t=
if "%c%"=="!" set t=
if "%c%"=="." set t=
set s=%s~1%
if not "%s%"=="" goto l
```
Reading a line from STDIN is a byte shorter than using `set s=%*`.
[Answer]
## PowerShell v4+, 43 bytes
```
([regex]::Matches($args,'[^?!.]*\?')).Value
```
Really straightforward. Takes input `$args` and feeds that in as the first parameter to a .NET `[regex]::Matches(...)` static function. The regex we're matching is `[^?!.]*\?` -- that is, any number of non-sentence-ending characters that are followed by a question mark. The static function returns an array of objects detailing what capture group, index, etc., but we only want the `.Value`s, so the return is encapsulated in parens and we call that property. This is where the v4+ requirement comes into play, as in prior versions you'd need to instead do something like a loop `|%{$_.Value}` or `|Select Value` to get the appropriate properties.
**Example without the parens and `.Value`**
```
PS C:\Tools\Scripts\golfing> .\what-exactly-was-your-question.ps1 "Huh? I haven't heard what you just said! Could you repeat that please?"
Groups   : {Huh?}
Success  : True
Captures : {Huh?}
Index    : 0
Length   : 4
Value    : Huh?
Groups   : { Could you repeat that please?}
Success  : True
Captures : { Could you repeat that please?}
Index    : 40
Length   : 30
Value    :  Could you repeat that please?
```
**Example with the parens and `.Value`**
```
PS C:\Tools\Scripts\golfing> .\what-exactly-was-your-question.ps1 "Huh? I haven't heard what you just said! Could you repeat that please?"
Huh?
 Could you repeat that please?
```
[Answer]
## Python 3, 91 bytes
```
def f(x,a=0):
 for n in range(len(x)):
  if x[n]in".!":a=n+1
  if x[n]is"?":print(x[a:n+1])
```
**Saves 1 byte in Python 2:**
```
def f(x,a=0):
 for n in range(len(x)):
  if x[n]in".!":a=n+1
  if x[n]is"?":print x[a:n+1]
```
[Answer]
# [Japt](https://github.com/ETHproductions/japt), 11 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
Using `replace` rather than `match`. Works out at the same byte count.
```
r"[^?]*[.!]
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=ciJbXj9dKlsuIV0&input=IkE/IGI/IGM/IGQhIg)
[Answer]
# [><> (Fish)](https://esolangs.org/wiki/Fish), ~~72~~ 69 bytes
```
>i:0(?^:"?"=?v\"!."@=?v=?v
^>l?v00. > ovr:    .12<  <
 ^ ~< ;!0^?l<<:
```
[Animated Version](http://mousetail.github.io/Fish/#eyJ0ZXh0IjoiPmk6MCg/XjpcIj9cIj0/dlxcXCIhLlwiQD0/dj0/dlxuXj5sP3YwMC4gPiBvdnI6ICAgIC4xMjwgIDxcbiBeIH48IDshMF4/bDw8OiIsImlucHV0IjoiYWI/ZGUhZWYuZ2g/Iiwic3RhY2siOiIxMiAyMyAyMSIsIm1vZGUiOiJudW1iZXJzIn0=)
## Explanation
[![enter image description here](https://i.stack.imgur.com/ddvoi.png)](https://i.stack.imgur.com/ddvoi.png)
The top row reads a character, pushes it onto the stack, and checks if it is `.`, `!` or `?`.
If it's a `!` or a `.`, we jump to 2,1 where there is a loop to clear the stack.
If it's a `?` there is a similar loop, futher to the right. Instead of discarding elements we reverse the stack first and print items instead of just discarding them. We then enter the same green loop but the stack is already empty so we will soon exit it. We push a 0 to the stack so the program doesn't crash here.
]