0

input text : Test1 test2 test3 / value1value2

Regex: /.*

Output: / value1value2

Expected: value1value2

  • Add a capturing group `\/(.*)`? Use a lookbehind `(?<=\/).*`? – jonrsharpe Feb 25 '20 at 22:52
  • 1
    Does this answer your question? [regex find all the strings preceded by = and ending in &](https://stackoverflow.com/questions/8141364/regex-find-all-the-strings-preceded-by-and-ending-in) Or [regex to match a character only if preceded with another character](https://stackoverflow.com/q/43658083/8967612) – 41686d6564 Feb 25 '20 at 22:52

1 Answers1

-1

Use some positive lookbehind like this (?<=\/ ).*. https://regex101.com/r/T8Cy4C/7

Eraklon
  • 4,043
  • 2
  • 10
  • 27