Skip to content

Instantly share code, notes, and snippets.

@chrisamoore
Created June 10, 2013 21:23
Show Gist options
  • Save chrisamoore/5752444 to your computer and use it in GitHub Desktop.
Save chrisamoore/5752444 to your computer and use it in GitHub Desktop.
$result = preg_replace("/(?<=<row\\sr=\\\")[0-9]+(?=\\\">)|(?<=\\sr\\=\\\")([A-Z]+)([0-9]+)(?=\\\")/usx", "5", $searchText);
<row r="4">
<c r="A4" s="0" t="inlineStr">
<is>
<t>7</t>
</is>
</c>
<c r="AZ4" s="0" t="inlineStr">
<is>
<t>No</t>
</is>
</c>
<c r="AA7" s="3" t="n">
<v>159900</v>
</c>
<c r="AZ7" s="4" t="n">
<v>40867</v>
</c>
</row>
<row r="40000009">
<c r="A4" s="0" t="inlineStr">
<is>
<t>7</t>
</is>
</c>
<c r="Z4" s="0" t="inlineStr">
<is>
<t>No</t>
</is>
</c>
<c r="AA7" s="3" t="n">
<v>159900</v>
</c>
<c r="AZ7" s="4" t="n">
<v>40867</v>
</c>
</row>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment