Home
Blogs
Questions
Jobs
Monetize

Home

About Us

Blogs

Questions

Jobs

Monetize

Post Job

banner

Questions about metacharacters

Read more about metacharacters

python (12.9k questions)

javascript (9.2k questions)

reactjs (4.7k questions)

java (4.2k questions)

java (4.2k questions)

c# (3.5k questions)

c# (3.5k questions)

html (3.3k questions)

Questions - metacharacters

Finding if a string start with 0 or more spaces followed by a string that might contain metacharacters

I need to find if a string start with 0 or more spaces followed by a comment string I don't know in advance, so I though of just constructing the pattern: local pattern = "^(%s" .. comment_s...
test-img

Ludo

lua

match

metacharacters

Votes: 0

Answers: 1

Latest Answer

local str = "--test" local pattern = "^%-%-%s*(.*)$" local _, _, contents = str:find(pattern) print(contents)
test-img

noobyy

Posts

Questions

Blogs

Jobs

The ultimate platform for coders and IT specialists

About

  • Company
  • Support

  • Platform

  • Terms & Conditions
  • Privacy statement
  • Cookie policy
  • Cookie option
  • OnlyCoders © 2025  |  All rights reserved