How to match “anything up until this sequence of characters” in a regular expression?

后端 未结 12 2313
旧时难觅i
旧时难觅i 2020-11-22 11:51

Take this regular expression: /^[^abc]/. This will match any single character at the beginning of a string, except a, b, or c.

If you add a *

12条回答
  •  一个人的身影
    2020-11-22 12:30

    This will make sense about regex.

    1. The exact word can be get from the following regex command:

    ("(.*?)")/g

    Here, we can get the exact word globally which is belonging inside the double quotes. For Example, If our search text is,

    This is the example for "double quoted" words

    then we will get "double quoted" from that sentence.

提交回复
热议问题