Skip to Content
  • Website
Codsen
  • Home
  • Open Source
  • Articles
  • About

backOpen Source→string-left-right→Examples

Permalink to Table of ContentsTable of Contents

  • Quick Take
  • Match a character sequence without regard to letter case
  • Match repeated sequences on the left and include nearby whitespace
  • Control how chomp functions include surrounding whitespace
  • Match repeated sequences on the right and include nearby whitespace
  • Match a whitespace-tolerant character sequence on the left
  • Combine optional and repeated sequence flags
  • Mark one sequence value as optional with a question mark
  • Match one or more repeated sequence values with an asterisk
  • Match a whitespace-tolerant character sequence on the right
  • Find the nearest non-whitespace character on the right
  • Treat a newline as a stopping point in either direction
  • Treat a raw non-breaking space as a stopping point
  • Match an astral symbol as two UTF-16 code units
↑ back to top

Permalink to Quick TakeQuick Take

↑ back to top

Permalink to Match a character sequence without regard to letter caseMatch a character sequence without regard to letter case

↑ back to top

Permalink to Match repeated sequences on the left and include nearby whitespaceMatch repeated sequences on the left and include nearby whitespace

↑ back to top

Permalink to Control how chomp functions include surrounding whitespaceControl how chomp functions include surrounding whitespace

↑ back to top

Permalink to Match repeated sequences on the right and include nearby whitespaceMatch repeated sequences on the right and include nearby whitespace

↑ back to top

Permalink to Match a whitespace-tolerant character sequence on the leftMatch a whitespace-tolerant character sequence on the left

↑ back to top

Permalink to Combine optional and repeated sequence flagsCombine optional and repeated sequence flags

↑ back to top

Permalink to Mark one sequence value as optional with a question markMark one sequence value as optional with a question mark

↑ back to top

Permalink to Match one or more repeated sequence values with an asteriskMatch one or more repeated sequence values with an asterisk

↑ back to top

Permalink to Match a whitespace-tolerant character sequence on the rightMatch a whitespace-tolerant character sequence on the right

↑ back to top

Permalink to Find the nearest non-whitespace character on the rightFind the nearest non-whitespace character on the right

↑ back to top

Permalink to Treat a newline as a stopping point in either directionTreat a newline as a stopping point in either direction

↑ back to top

Permalink to Treat a raw non-breaking space as a stopping pointTreat a raw non-breaking space as a stopping point

↑ back to top

Permalink to Match an astral symbol as two UTF-16 code unitsMatch an astral symbol as two UTF-16 code units

↑ back to top
back 

Copyright

All rights reserved © Roy Revelt 2026
All our open source packages are under MIT licenceopens in a new tab

Activities

🐛 See a bug? Raise an issueopens in a new tab
💘 Check out the Indiewebopens in a new tab and Libera manifestoopens in a new tab