[Question]
  [
This challenge is about implementing [Shm-reduplication](https://en.wikipedia.org/wiki/Shm-reduplication), originating in Yiddish, where one takes a word, duplicates it, and replaces the first syllable in the second word with "Shm" in order to indicate that one does not care. Some examples include:
* "Isn't the baby cute?", "Eh, baby shmaby"
* "Come buy from my store, we have a sale!", "Pff, sale shmale"
* "I got this smartphone yesterday, isn't it cool?", "Meh, smartphone shmartphone"
# Rules
In the real world there are a bunch of [special cases](https://en.wikipedia.org/wiki/Shm-reduplication#Phonological_properties), but for this challenge we will use rules that describe a simplified version of the full linguistic phenomenon that is more suitable for programming:
1. Consonants up to first vowel are replaced by "shm".
2. Prepend shm to words beginning with vowels.
3. If a word contains no vowels it is returned unchanged. No vowel, no shm.
4. The vowels are: a, e, i, o, u.
5. The input will be restricted to lowercase letters.
6. The output should be a lowercase string containing the reduplicated version of the input. **If the input is "string" the output should be "shming"**.
This is code golf, shortest code wins!
# Example solution (ungolfed python)
This is an example of code that would solve the challenge:
```
def function_shmunction(string):
    vowels = "aeiou"
    for letter in string:
        if letter in vowels:
            index = string.index(letter)
            shming = "shm" + string[index:]
            return shming
    return string
```
# Test cases
* function -> shmunction
* stellar -> shmellar
* atypical -> shmatypical
* wwwhhhat -> shmat
* aaaaaaaaaa -> shmaaaaaaaaaa
* lrr -> lrr
* airplane -> shmairplane
* stout -> shmout
* why -> why
An answer has been accepted since there haven't been any new responses in a while, but feel free to add more!
  
[Answer]
# [sed](https://www.gnu.org/software/sed/), 29 bytes
```
s/[^aeiou]*\([aeiou]\)/shm\1/
```
[Try it online!](https://tio.run/##PYvRCsMgDEXf8yXbYMi@RzsIzjaBLIpGpF/fCoXepwPn3JZ@7037cTTnv5g49@UVHv6i8HSN/uHjprbKusHaNRpnhWZJBCug7YUjCowxiAgN8B5InQHXIqhpPnI3GLSf "sed – Try It Online")
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), ~~16~~ 12 bytes
```
œlØḄṭ⁸¹?“shm
```
[Try it online!](https://tio.run/##y0rNyan8///o5JzDMx7uaHm4c@2jxh2Hdto/aphTnJH7/1HD3Ic7px1awvVwx6bD7Y@a1nj//59Wmpdckpmfp1BcAtScWKSQWFJZkJmcmKNQXl6ekZGRWKKQCAcKOUVABZlFBTmJealAHfmlJQA "Jelly – Try It Online")
*-4 thanks to ovs remembering there's a strip builtin*
```
œlØḄ            Strip all leading consonants.
    ṭ   “shm    Prepend "shm"
      ¹?        if there's anything left, otherwise
     ⁸          give the original word.
```
[Answer]
# [Haskell](https://www.haskell.org/), 50 bytes
```
snd.break(`elem`"aeiou")>>=(?)
""?s=s
r?_="shm"++r
```
[Try it online!](https://tio.run/##PY7BDoIwDIbvPkXTcICgPoEbL6Anj2K04JDFMZZ1hPjyTqbG/9D/a/unaU/8UMbETtSR7W3beEWP/KqMGq5ISo8TFlKKvCpWiBULXvnqIpD7AcvSx4G0BQEDuQO4KRyD31vIIK8ZNhIYyhIQhFzKQh1wAbtMwgnn0d9wDdhQ80zOZNTHg9f2nqibbBv0aL/T5UXyCSk8nW7JJJ7nuV9E4bP4K3UmfNPaO0P2d3qcAp7jq@0M3TluWufe "Haskell – Try It Online")
*Thanks to Roman Czyborra for -2 bytes*
[Answer]
# [sed](https://www.gnu.org/software/sed/), 25 bytes
```
/[aeiou]/s/[^aeiou]*/shm/
```
[Try it online!](https://tio.run/##PYtBCoAwDMDufYogfZAoFJ22UDtZO4avn4JgTjkknrbxsNo7TpQk1xkdp@XTAZ1P7N2jiB2wV1tDsoFHUqUCFPclKym01piZAugHtLyBlEvJ0nvkGtD4fgA "sed – Try It Online")
`/[aeiou]/` is a conditional that only runs the substitution `s/[^aeiou]*/shm/` if there is a vowel in the line. This prevents needing to capture the first vowel and then using a backreference as in the more obvious `s/[^aeiou]*\([aeiou]\)/shm\1/`.
[Answer]
# [Stax](https://github.com/tomtheisen/stax), 11 [bytes](https://github.com/tomtheisen/stax/blob/master/docs/packed.md#packed-stax)
```
ÄFï¥░$º{═┘ç
```
[Run and debug it](https://staxlang.xyz/#p=8e468b9db024a77bcdd987&i=function%0Astellar%0Aatypical%0Awwwhhhat%0Aaaaaaaaaaa%0Alrr%0Aairplane%0Astout%0Awhy%0A&a=1&m=2)
1. Left-trim consonants.
2. If non-empty, prepend "shm".
3. Else restore original input.
[Answer]
# [Zsh](https://www.zsh.org/), 36 bytes
```
<<<${(S)1/#(#b)*([aeiou])/shm$match}
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m724qjhjwU3f4tSS_IIShdSKktS8lNSU9Jz8JK60_CIFQwWN5PyU1PT8nDSF4pLUnJzEIoXEksqCzOTEHIVEMFDIKSrSLCjKzCtJU1AxjFFQU1taWpKma3FTxcbGRqVaI1jTUF9ZQzlJU0sjOjE1M780VlO_OCNXJTexJDmjFqJ2AZSC0gA)
* `<<<`: print
* `${1}`: the input...
	+ `//`: replace the first match
		- `#`: matching only at the beginning of the string
		- `(#b)`: activate backreferences, so the `()` group gets stored in the `$match` variable
		- `(S)`: use the shortest possible match, rather than the longest
		- `*`: anything
		- `()`: store this match in the variable:
			* `[aeiou]`: followed by a vowel
	+ with `shm$match`: the string `shm`, plus the matched vowel
`$match` is actually an array which contains all the backreference groups, but since there's only one group, we don't need to access any specific element with `[1]`
[Answer]
# [Python 3.8 (pre-release)](https://docs.python.org/3.8/), 62 bytes
```
lambda s:(q:=s.lstrip('bcdfghjklmnpqrstvwxyz'))and'shm'+q or s
```
[Try it online!](https://tio.run/##PVC7csQgEOv5iu3Ak8s1aTKeId2lTZMyDbZxIIcBL@v4nJ938FPNSlqNliFOZIJ/eY04t/JrdqqrGgWpFH0p09UlQhsFr@qm/TY/d9f52GOi3/Ex/fGiUL7hyXT8qYeAkObRWKfhEwddMgDCaRkA1scLhIFALnQgUVxTdJYEh@c34MUaQp1ghYRW5NjmRrSeRN5JmQsuW1WWy1Y/ah0Jbh/vN8SA260KtbrP7eBrssEv/fmBu2KJtHMKd3flTNEUba3cbh6SjeNojFF0@kydOLwTzOHamgdTFqNTXh@hXebjyxdsZmb/ "Python 3.8 (pre-release) – Try It Online")
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E/wiki/Commands), ~~28~~ 13 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
```
žNSÛ©ai®…shmì
```
[Try it online](https://tio.run/##ASYA2f9vc2FiaWX//8W@TlPDm8KpYWnCruKApnNobcOs//9hdHlwaWNhbA) or [verify all test cases](https://tio.run/##yy9OTMpM/V9Waa@k8KhtkoKSfaXL/6P7/IIPzz60MjHz0LpHDcuKM3IPr/lfq/M/Wqk8vyhFSUdBKSkxqRJEFyfmpILpkqLMvHQQK600L7kkMz8PIpqak5NYBGImllQWZCYn5oDY5eXlGUCQWAKWgAMQL6cEojqzqCAnMQ9qdH5piVIsAA).
**Explanation:**
```
žNSÛ           # Trim all leading consonants of the (implicit) input-string
    ©          # Store this new string in variable `®` (without popping)
     ai        # Pop, and if any letters are left (thus the input-string contains
               # a vowel):
       ®       #  Push string `®` again
        …shmì  #  Prepend "shm"
               #  (implicitly print it as result)
               # (implicit else)
               #  (implicitly output the implicit input-string)
```
[Answer]
# [Powershell](https://github.com/PowerShell/PowerShell), 36 bytes
```
$args-replace('^.*?([aeiou])','shm$1')
```
### Explanation
Simple replace with a named group reference.
[+4](https://tio.run/#%23K8gvTy0qzkjNyfn/XyWxKL042iBWtyi1ICcxOVVDXSNOT8s@OjE1M780VlNdR704I1fFUF3z////SiAt@UoA)
Thanks [caird coinheringaahing](https://codegolf.stackexchange.com/users/66833/caird-coinheringaahing)
[-5](https://tio.run/#%23K8gvTy0qzkjNyfn/XyWxKL1Ytyi1ICcxOVVdI05Pyz46MTUzvzRWU11HvTgjV8VQ/f///0og1flKAA)
Thanks [mazy](https://codegolf.stackexchange.com/users/8745/mazzy)
[Answer]
# [Python](https://www.python.org), 53 bytes
```
lambda s:re.sub("^.*?([aeiou])","shm\\1",s)
import re
```
[Attempt This Online!](https://ato.pxeger.com/run?1=LYxNCgIhGED3neLDlcYktAhCiA6SBU6jjeAfnwp2ljZC1J26TcT0Nm_13uOd7mWOoT_NQb5qMZv9Z-eUHycFWaDmuY6UXPj6SE9K21jPjAwkz17KLRkyW1mfIhZA_Y-FiQgNbCDXOOlbdAZy0c4pBPUDHCLhOTlbKBMJbSi0DYY2xpZD74u_)
Another regex answer.
---
Alternative:
# [Python](https://www.python.org), 53 bytes
```
lambda s:re.sub(".*?(?=[aeiou])","shm",s,1)
import re
```
[Attempt This Online!](https://ato.pxeger.com/run?1=LYxNCgIhGED3neLDlYYJLYIQhjlItXAabQT_-FSws7QRou7UbSKmt3mr9x7vdC9LDP1phvOrFrM7fg5O-WlWkCVqketEidiOdBxOSttYL4xwkhdPeOZ7trE-RSyA-h9LExEa2ECucda36Azkop1TCOoHOEQicnK2UCYT2lBo44Y2xtZD76u_)
[Answer]
# [Haskell](https://www.haskell.org/), 48 bytes
```
g.break(`elem`"aeiou")
g(s,"")=s
g(_,r)="shm"++r
```
[Try it online!](https://tio.run/##PY7BDoIwDIbvPkXTeICAPoHjCfTkUY0UHLA4xrKOEF/euaHxP/T/2v5pOhA/pdahE9fQ7xsn6ZnVUsuxRpJqmjHf9BmXiLngSPfS5QJ5GLEoXBhJGRAwkj2Bnf3Zu6OBLWRXhl0FDEUBCKKKJVIHnMNhW8EFl8k9sARsqHklZ9Jyde@U6RN1s2m9msx3Gh8kl5D8y6qWdOJlWYYo8uvir9Rp/00rZzWZ3@lp9ngL77bT1HPYtdZ@AA "Haskell – Try It Online")
[Answer]
# [Japt](https://github.com/ETHproductions/japt), 15 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
```
r"^.*?%v"ÈÌi`¢m
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=ciJeLio/JXYiyMxpYKJt&input=WwoiZnVuY3Rpb24iCiJzdGVsbGFyIgoiYXR5cGljYWwiCiJ3d3doaGhhdCIKImFhYWFhYWFhYWEiCiJscnIiCiJhZXJvcGxhbmUiCiJzdG91dCIKIndoeSIKXQotbVI) (Includes all test cases)
```
r"^.*?%v"ÈÌi`¢m     :Implicit input of string
r                   :Replace
 "^.*?%v"           :  RegEx /^.*?[aeiou]/gi
         È          :  Pass each match through a function
          Ì         :    Last character
           i        :    Prepend
            `¢m     :      Compressed string "shm"
```
[Answer]
# [Retina](https://github.com/m-ender/retina/wiki/The-Language), 19 bytes
Just a regex replacement, there might be some language feature which allows for a shorter solution.
```
^.*?(?=[aeiou])
shm
```
[Try it online!](https://tio.run/##PcFRCoAgDADQ/53E@gg6QHiQKBpibDA1dCKdfv31Xo3KGVdL7gI7l9k7v@0YufRjgkbJ7O45KJcMTaMIVkB9Hw4oMMYgIlTAH0itHw "Retina – Try It Online")
[Answer]
# [SNOBOL4 (CSNOBOL4)](http://www.snobol4.org/csnobol4/), 49 bytes
```
	I =INPUT
	I BREAK('aeiou') ='shm'
	OUTPUT =I
END
```
[Try it online!](https://tio.run/##K87LT8rPMfn/n9NTwdbTLyA0hAvIcgpydfTWUE9MzcwvVddUsFUvzshV5@L0Dw0BKgCq43L1c/n/P7EoHQA "SNOBOL4 (CSNOBOL4) – Try It Online")
`BREAK` "matches zero or more characters provided they are not in the set of characters in the argument string. That is, it matches up to, but not including, a character from the argument string."
[Answer]
# [C (gcc)](https://gcc.gnu.org/), 81 bytes
```
i;f(char*s){for(i=0;*s-"aeiou"[++i%6];i%6||s++);printf("shm%s"+3*!*s,s-i*!*s/6);}
```
[Try it online!](https://tio.run/##PU/bioMwEH1uviI7ICRGaWGhL2n3R4oPIehmIFXJRKRr/XY3sdudh5kz93Ns/W3ttqHuhHUmlCSXbggCryddUg2mxWGCm1JYnBud3PNJSkk9BuxjJ4DcvSBQn@VHSRXVmOPxLPW63Q32Qi4sX@VltLeGX/nCoJt6G3HooWJAsfXehAxNfIxojc94nmfnnIl7/d9y5sNrGMPoTd@@bgzTPjm7B7BVs0Sfi8SOY3p40ilcOOFPO3QiWsmP72SXK1M/6UnEDm9JBfH6i0PFE2dspGaHvPgHxymSAEhwZev2Cw "C (gcc) – Try It Online")
[Answer]
# [Vyxal](https://github.com/Vyxal/Vyxal), 13 bytes
```
k⁰øl:[«88«p|_
```
[Try it Online!](https://vyxal.pythonanywhere.com/#WyIiLCLGmyIsImvigbDDuGw6W8KrODjCq3B8XyIsIl07WsabYCA9PiBgajvigYsiLCJbXCJ3b3JkXCIsIFwiYmFieVwiLCBcInNhbGVcIiwgXCJzdHJpbmdcIiwgXCJmdW5jdGlvblwiLCBcInN0ZWxsYXJcIiwgXCJhdHlwaWNhbFwiLCBcInd3d2hoaGhhdFwiLCBcImFhYWFhYWFhYWFcIiwgXCJsdHJcIiwgXCJhaXJwbGFuZVwiLCBcInN0b3V0XCJdIl0=)
Port of Jelly.
## How?
```
k⁰øl:[«88«p|_
k⁰øl           # Strip leading consonants
    :[         # If there's anything left:
      «88«p    # Prepend "shm"
           |_  # Else, pop, returning the implicit input
```
[Answer]
# JavaScript, 36 bytes
```
s=>s.replace(/.*?([aeiou])/,"shm$1")
```
[Try it online!](https://tio.run/##PY1RDsIgEETvQvwAozQeoHoQbdINboVmyxKgkp4eaT@cr5nJm8wMX0gmupCvnt9Yp76m/p50xEBgUHb6/JBPQMfroLqLSHY53YSqhn1iQk38kU8xrd5kx140ICMRxOYgb8EZoGZLKdZayHv7VwsUDxAjtzePx5zXHSt2E4NeIMhJ6ZmdH19@VPUH) (includes all test cases)
[Answer]
# Excel, 149 bytes
```
=IFERROR(REPLACE(A1,1,FIND("$",SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1,"a","$"),"e","$"),"i","$"),"o","$"),"u","$"))-1,"shm"),A1)
```
102 bytes just to find the vowels. If anybody knows a better way to do this. please share.
From inside out:
* SUBSTITUTE vowels with `$`
* Find the index of the first `$`
* Replace chars before this index with `shm`
* If no vowels, return input.
[Answer]
# [Perl 5](https://www.perl.org/) + `-p`, 20 bytes
Uses the `;` separator (as `;` is implicitly added via `-p`).
```
s;.*?(?=[aeiou]);shm
```
[Try it online!](https://dom111.github.io/code-sandbox/#eyJsYW5nIjoid2VicGVybC01LjI4LjEiLCJjb2RlIjoiczsuKj8oPz1bYWVpb3VdKTtzaG0iLCJhcmdzIjoiLXAiLCJpbnB1dCI6ImZ1bmN0aW9uXG5zdGVsbGFyXG5hdHlwaWNhbFxud3d3aGhoYXRcbmFhYWFhYWFhYWFcbmxyclxuYWlycGxhbmVcbnN0b3V0In0=)
---
# [Perl 5](https://www.perl.org/) + `-lF/^[^aeiou]+/ -M5.10.0`, 17 bytes
Slightly more cheaty with the regex in the flags, but saves a few bytes
```
say@F?(shm,@F):$_
```
[Try it online!](https://dom111.github.io/code-sandbox/#eyJsYW5nIjoid2VicGVybC01LjI4LjEiLCJjb2RlIjoic2F5QEY/KHNobSxARik6JF8iLCJhcmdzIjoiLWxGL15bXmFlaW91XSsvXG4tTTUuMTAuMCIsImlucHV0IjoiZnVuY3Rpb25cbnN0ZWxsYXJcbmF0eXBpY2FsXG53d3doaGhhdFxuYWFhYWFhYWFhYVxubHJyXG5haXJwbGFuZVxuc3RvdXQifQ==)
[Answer]
# [C (gcc)](https://gcc.gnu.org/), ~~125~~ 113 bytes
*-8 bytes thanks to [@ceilingcat](https://codegolf.stackexchange.com/users/52904/ceilingcat)*
```
#define T&&*s-
main(s,v)char**v,*s;{for(s=*++v;*s T'a'T'e'T'i'T'o'T'u'||!(*v=memcpy(s-3,"smh",3));++s);puts(*v);}
```
[Try it online!](https://tio.run/##DcpBDoMgEADAe19hNRFY4OSR@As@QFasJKLEVRJT@3bKYW6D@oNYSjf5OWy@sX0PpF/RhY2TygIXdwBkBWS@835wGkHKbIAayxyzzFeh2quLPc@bQx6jj5huTnpQLcWlVYMQRkoSJl0n1SHMr5QyufNOAd36Bw "C (gcc) – Try It Online")
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 25 bytes
```
≔⌕Ｅθ№aeiouι¹η¿⊕η«shm✂θη»θ
```
[Try it online!](https://tio.run/##LYy9CgIxEIRr8xQhVRZiYZ1KBMFCEHyCkNszC7mNlx8b8dljDi2m@JhvxgeXfXKx92Mp9GB9Jp701T31auQpNa5aOaTUlJEEYORhJIAVNEt9YZ9xQa446QAg32J3y7RNSljUkP54j@RxOxySFR@BsaD8VSvY3ufGvlLivn/FLw "Charcoal – Try It Online") Link is to verbose version of code. Explanation:
```
≔⌕Ｅθ№aeiouι¹η
```
Count the number of vowels in each character and find the first `1` i.e. the index of the first vowel in the input.
```
¿⊕η
```
If there was in fact a vowel, then...
```
«shm✂θη»
```
... output the literal string `shm` followed by the input sliced starting at that index.
```
θ
```
Otherwise just output the input string.
[Answer]
# Java 8, 40 bytes
```
s->s.replaceAll("^.*?([aeiou])","shm$1")
```
Port of the [JavaScript](https://codegolf.stackexchange.com/a/247758/52210) and [Retina](https://codegolf.stackexchange.com/a/247754/52210) answers.
[Try it online.](https://tio.run/##PVDNTsMwDL7vKayIQ8KySBM3JkA8ALtwnIbkZdma4aVV4raq0J69uKPChyh2vj/ngh2uLsfv0ROWAh8Y088CICYO@YQ@wHZqAT45x3QGr@dLMRuZ3xZyFEaOHraQ4GUsq9ficmhIuO9EWn25xze9wxDrdm@UVaW6PqyVGTcTtWkPJNRZoavjEa6SYDbZ7dH8uZ/qrDvMwKEwPIPq63y0BzwMtiAFW@5we2qT51gn6QMRZos8NNEj2b7vKylki/9liQURs0RNk0TdsnKlochaYhpzN5bFB1G7Onl1jbgwJT2lWCpQ054BWa@fVtPIUUhnrrQxy@T8HWXmX7qNvw)
Or a minor alternative:
```
s->s.replaceAll("^.*?(?=[aeiou])","shm")
```
[Try it online.](https://tio.run/##PVDNbsIwDL7zFFZOyQiRpt2GGNoDjMuOiEkmBBpm0ipxW1UTz965rJoPUex8f84VO1xdT9@jJywFPjCmnwVATBzyGX2A3dQCfHKO6QJez5di1jK/L@QojBw97CDBZiyrt@JyaEi470Rafbmnrd5u9hhi3R6MsqpUN2XG9URt2iMJdVbo6niCmySYTfYHNH/u5zrrDjNwKAyvoPo6n@wRj4MtSMGWB9ye2@Q51kn6QITZIg9N9Ei27/tKCtnif1liQcQsUdMkUbesXGkospaQxjyMZfFB1G5OXl0jLkxJTymWCtS0Z0DWzy@raeQopAtX2phlcv6BMvMv3cdf)
**Explanation:**
```
s->             // Method with String as both parameter and return-type:
  s.replaceAll( //  Modify and return the String: Regex-replace all
    "...",      //  these matches
    "...")      //  with these replacements
```
*Regex-explanation 1:*
```
^.*?([aeiou])    # Match:
^                #  At the start of the string
 .*              #  Match zero or more characters
   ?             #  Which are optional, to give other matches precedence
     [aeiou]     #  Followed by a vowel
    (       )    #  captured in capture group 1
shm$1            # Replacement:
shm              #  Literal "shm"
   $1            #  And the vowel of capture group 1
```
*Regex-explanation 2:*
```
^.*?([aeiou])    # Match:
^                #  At the start of the string
 .*              #  Match zero or more characters
   ?             #  Which are optional, to give other matches precedence
    (?=       )  #  Followed by a positive (non-matching) look-ahead to:
       [aeiou]   #   A vowel
shm              # Replacement:
shm              #  Literal "shm"
```
Minor note: the `replaceAll` with `^` is basically the same as a `replaceFirst` without the `^`, but 1 byte shorter: [try it online](https://tio.run/##PVC9bsMgEN7zFCfUARqCFHVrlHbr1iwdowwXjGNSgi0427KqPLt7pFZvQNzx/R1XHHBzrb5nGzBn@EQff1YAPpJLNVoHh9ICfFHy8QJWLpesdjy/r/jIhOQtHCDCfs6bt2yS6wJzP3zKJIV5fpdHdL7tT0pokZvb01aoeVe4XX8OzF0khtZXcOMIi8vxhOrPvm6THDABuUzwCmJsU6XPeJ50xuB0fsB13UdLvo3cuxAwaaSp8xaDHsex4ULS@F86ECN84qyxSLQ9CZO74DmzFko9jHnzidVuhl9Nxy4Uoiwp1gJEWdQhye3LpoxMcPFCjVRqHY19oNTyTff5Fw).
[Answer]
# [Pip](https://github.com/dloscutoff/pip), 15 bytes
```
a~XVaH$(:"shm"a
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m724ILNgwYKlpSVpuhbrE-siwhI9VDSslIozcpUSIaJQyTXRSomZRQU5iXmpSrFQMQA)
### Explanation
```
a~XVaH$(:"shm"a
a                Command-line argument
 ~               Find first match of
  XV             regex `[aeiou]`
      $(         Index of that match
    aH           Prefix of cmdline arg containing that many characters
        :        Set to
         "shm"   that string
                 If a vowel was not found, $( is nil, which means no assignment is done
                 and a's value remains unchanged
              a  Autoprint the (possibly changed) value of a
```
[Answer]
# [APL (Dyalog Extended)](https://github.com/abrudz/dyalog-apl-extended), 31 bytes
```
{⍵≢⍛≡n←⌊/⍵⍳'aeoiu':⍵⋄'shm',n↓⍵}
```
[Try it online!](https://tio.run/##XY9NCsIwEEb3PUV2UbDo2hu48gyhTU0gpqVNqUXciVC1IogrV3oF8UK5SEzS/2YRmDfvG2ZQxFw/RyzcuHgnMPexr@TtuVrL032hAv3vZfmTxUeWL1m8uQbyep4bVn4hwiFN4dJUlyNMyBbOtPHQ9UGpSQBgkHJP0JBDAKZA54GRGuYYIxGYMRRroWdUyPaRyCPqITaY0EKrZFlGCEFipNT59sFes4NWYrFdAHRLGFLlaRwxxPFweAPrE8JUwH5aKwZV25F8NNsQ5w8 "APL (Dyalog Extended) – Try It Online")
[Answer]
# [Haskell](https://www.haskell.org), ~~58~~ 57 bytes
```
f s|g s>""="shm"++g s|1>0=s
g=dropWhile(`notElem`"aeiou")
```
[Attempt This Online!](https://ato.pxeger.com/run?1=PVCxbgIxDN35CstiAF2R2g2kJlu3MjF0aJEwkLuLmkuixNEJiT_pwoLY-zf9GxKO4sF-z7aen_xzaSl-K2NOp3Piejb_W9QQjw1EiSgwth1WVWbHF_ks4qgR--D8R6uNmmys4zejug2S0i7h9C7w25G2IKAjvwSfeMXh3cIYJl8RZhIiVBUgCJlTRvnaFF7HEj6xd2GPT4Bb2h5KjWTUrXLQtimoTnbH2tmhm11TKJD44PWOTMF937c5iG-DRxRmeNjWwRuyd2mXGNeD8_8XXAE)
*-1 byte thanks to Wheat Wizard ♦*
[Answer]
# [brainfuck](https://github.com/TryItOnline/brainfuck), 531 bytes
```
->+[->[>],[+[-<+]->+[>]<[>+>+<<-]>>[<<+>>-]-[>++<-----]>-----<<[->>-<<]+>>[<<->>[-]]<<[+[-<+]->-]+[-<+]->[[>]<[>+>+<<-]>>[<<+>>-]-[>++<-----]>-<<[->>-<<]+>>[<<->>[-]]<<[+[-<+]->-]+[-<+]->[[>]<[>+>+<<-]>>[<<+>>-]-[>++<-----]>+++<<[->>-<<]+>>[<<->>[-]]<<[+[-<+]->-]+[-<+]->[[>]<[>+>+<<-]>>[<<+>>-]-[>--<-------]>+<<[->>-<<]+>>[<<->>[-]]<<[+[-<+]->-]+[-<+]->[[>]<[>+>+<<-]>>[<<+>>-]----[>+++++<--]>-<<[->>-<<]+>>[<<->>[-]]<<[+[-<+]->-]+[-<+]->[>]]]]]]+[-<+]->]>[>]<-[++[-<+]->>[.>]>-<]>+[[--------->++<]>+.-----------.+++++.<<<.,[.,]]
```
[Try it online!](https://tio.run/##rZJBCkIxDEQPlE5OEOYiYRZ@QRDBheD5a1oIbhX@bJIM7WNSerwu9@ftfX3MCVqCSY2sJkzLoCJptAiIzAgjIZRngSVxl4i6yyqyfayGhFR2s6Du8ifq6USr9hxmrQs09RRmaUW1nfbf5amtnrWcQFobTOdiVthMtNbLlOP4yncCjwgf6UOa8@j/8QE "brainfuck – Try It Online")
This implementation is as close to a nested if/else statement as bf allows. Simply checks each letter to see if it's a vowel. If it finds one, it prints "shm", then the vowel, then the rest of the input. If it doesn't, it simply prints out the input from its buffer.
---
# [brainfuck](https://github.com/TryItOnline/brainfuck), 423 bytes
```
+[--------->++<]>+.-----------.+++++.<->>+[>,[>+>+<<-]>>[<<+>>-]-[>++<-----]>-----<<[->>-<<]+>>[<<->>[-]]<<[<<->>-]<<[>[>+>+<<-]>>[<<+>>-]-[>++<-----]>-<<[->>-<<]+>>[<<->>[-]]<<[<<->>-]<<[>[>+>+<<-]>>[<<+>>-]-[>++<-----]>+++<<[->>-<<]+>>[<<->>[-]]<<[<<->>-]<<[>[>+>+<<-]>>[<<+>>-]-[>--<-------]>+<<[->>-<<]+>>[<<->>[-]]<<[<<->>-]<<[>[>+>+<<-]>>[<<+>>-]----[>+++++<--]>-<<[->>-<<]+>>[<<->>[-]]<<[<<->>-]]]]]+[-<+]->>]>.,[.,]
```
[Try it online!](https://tio.run/##rVFLCkJBDDtQpj1ByUVKFj5BEMGF4PnHdvDhUlGz6Yc0pO12O5yvp/vxMifSdhAIEW4vOBoeRiI5kiAiTGRGgDRZ9tgiiytEZNErCItWRZpU7ZVbZ3yr9BeV8v6DTq3yPIP4vU6hLWG5@mSxRn0loCpFH@lDc277zx4 "brainfuck – Try It Online")
A shorter version that only works for words with vowels.
[Answer]
# [V (Eh, vim shmim)](https://github.com/DJMcMayhem/V), 23 bytes
```
:%s/.\{-}\ze[aeiou]/shm
```
vim non-greedy regex with look-ahead.
[Try it online!](https://tio.run/##PcsxDoAgDEDRvfdwVHavIg4NwZSkAoEiQePZkck/v3/1vk5ZLfqZX33bDa0LZVeZzt6P4o244CGLZcYEKC06gwy1ViJCAfwDTgO4FBm9HUcoApXaBw "V (vim) – Try It Online")
Same in “magic very very” mode:
# 23 bytes
```
:%s/\v.{-}[aeiou]@=/shm
```
[Try it online!](https://tio.run/##PctBCoAgEEDR/dyjZbkPgu5RLQYxRphUdFQkOru16q/fL73PQ1J7me7x2dBYn491UYmu3s/stFjvIIlhxggoLViNDLVWIkIB/AOOH7AxMDrzHT4LVGov "V (vim) – Try It Online")
Further 3 bytes can be saved by replacing `:%s/` with V’s specific `í`
[Answer]
# [Go](https://go.dev), 103 bytes
```
import."regexp"
func f(s string)string{return MustCompile(`^.*?([aeiou])`).ReplaceAllString(s,"shm$1")}
```
[Attempt This Online!](https://ato.pxeger.com/run?1=PY_PSsQwEMbPzlOE4CFZ1oI3EURE8CaIHkXtUKdtME1CMqEuy76Bb-BlEXyofRvT7bpzmT98M99vvn86v90tAjYf2JEY0DgwQ_CRK9kOLI9N4mhcl-Rv5vbsYtf9zyN19BkktNk1olVJzEI9p3UkztGJ-5z41g_BWFL1a7W4Vs9IxucXXevqkYLFhm6sfdovqbSUqR9Oz6XeHOy-9ucnOqXFGlofxdsyicsrEdEV7jtD9j2pepKx8Q4Sk7UYAXkVTIMWxnHs-x4Z8BhgYxGYWNwdlQ2fGcZ-BTN6PRmdPJSSrStI03NawwYOTNvtnP8A)
[Answer]
# [tinylisp 2](https://github.com/dloscutoff/tinylisp2), ~~64~~ 61 bytes
```
(\(S)(: T(drop-while(. !(p contains?"aeiou"))S)(? T(,"shm"T)S
```
Try it at [Replit](https://replit.com/@dloscutoff/tinylisp2). Example session:
```
tl2> (\(S)(: T(drop-while(. !(p contains?"aeiou"))S)(? T(,"shm"T)S
(() (S) (: T (drop-while (. ! (p contains? "aeiou")) S) (? T (, "shm" T) S)))
tl2> (def shm _)
shm
tl2> (map shm (list "codegolf" "stellar" "airplane" "lrr"))
("shmodegolf" "shmellar" "shmairplane" "lrr")
```
### Explanation
Port of [Unrelated String's Jelly answer](https://codegolf.stackexchange.com/a/247761/16766), among others.
First, we need a function that tests whether a character is not a vowel:
```
(. !(p contains?"aeiou"))
(.                      ) ; Compose
   !                      ; Logical negation
    (p                 )  ; with the partial application of
       contains?          ; the contains? function
                "aeiou"   ; to "aeiou"
```
Then our main function is as follows (where `(...)` represents the above function):
```
(\(S)(: T(drop-while(...)S)(? T(,"shm"T)S)))
(\                                         ) ; Lambda function
  (S)                                        ; that takes a string S:
     (: T                                 )  ;  In what follows, let T be
         (drop-while     S)                  ;   Drop characters from S while
                    (...)                    ;   they are not vowels
                           (? T          )   ;  Is T truthy (nonempty)?
                               (,"shm"T)     ;  If so, concatenate "shm" with T
                                        S    ;  If not, return the original string S
```
[Answer]
# [Nibbles](http://golfscript.com/nibbles/index.html), 15.5 bytes
```
?,;>~$-~?"aeiou"$:"shm"@@
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m708LzMpKSe1eMGCpaUlaboWO-11rO3qVHTr7JUSUzPzS5VUrJSKM3KVHBwg8lBl66KVYpSKS4oy89JjlJRioaIA)
Nibbles has no built-in for vowels, which makes it slightly worse than other golfing languages for this.
## Explanation
```
?         If
,          non-empty
;           x :=
>~           drop-while
$             from input
-~            not
? "aeiou"      contained in "aeiou"
$              it
          then
: "shm"    prepend "shm"
@          to x
          else
@          input
```
]