[Solved] I need a pattern in regex engine to ignore a specific set of characters(eg: “~~”) [closed]

[ad_1]

(?:~~)?1(?:~~)?2(?:~~)?

matches all your example strings. Is that what you meant?

Explanation:

  • (?:~~) combines two tildes into a single (non-capturing) group.
  • ? makes that group optional.

10

[ad_2]

solved I need a pattern in regex engine to ignore a specific set of characters(eg: “~~”) [closed]